You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This solution works correctly, tested in Sqlite 3.30.1, we should implement it, you just have to do the PR and the framework has tests for the indexes, foreingkey.
What steps will reproduce the problem?
Create two sqlite3 databases named
otherdb
andmydb
and create a connection for yii2 to use the sqlite3mydb
database.Then, create a migration like this:
What is the expected result?
An index is created in the
otherdb
databaseWhat do you get instead?
The following error:
Cause
The correct syntax for the CREATE INDEX in this case is:
Solution:
Create a new function in
yii\db\sqlite\QueryBuilder
:This problem and a lot more with sqlite3 is solved using the extension
yii2-sqlite3-full-support
.Additional info
The text was updated successfully, but these errors were encountered: