Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration failed for SQLite database #9

Open
nlrooat opened this issue Feb 5, 2016 · 0 comments
Open

Migration failed for SQLite database #9

nlrooat opened this issue Feb 5, 2016 · 0 comments

Comments

@nlrooat
Copy link

nlrooat commented Feb 5, 2016

Following installation instructions I'm trying to run the database migration. The migration is trying to add a foreign key, resulting in the following errror:

Exception 'yii\base\NotSupportedException' with message 'yii\db\sqlite\QueryBuilder::addForeignKey is not supported by SQLite.'

Instead of using (as suggested by the official Yii documentation):
$this->addForeignKey(..)

consider using $options parameter for createTable() function, see http://www.yiiframework.com/doc-2.0/yii-db-migration.html#createTable()-detail.

By the way, I noticed in the down() function of the filemanager_init migration, you drop two foreign keys, but only one was created in the up() function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant