Answer the question
In order to leave comments, you need to log in
What is my mistake with migrations?
I generate migrations through gii, a file is created in frontend/migrations, I take a file from a git on another server, I write php yii migrate and I get
Yii Migration Tool (based on Yii v2.0.37)
No new migrations found. Your system is up-to-date.
Answer the question
In order to leave comments, you need to log in
Good afternoon.
For advanced, specify the path to migrations --migrationPath="@frontend/migrations" .
In order not to specify the path - place the migrations in the directory intended for this (if I'm not mistaken - console / migrations for advanced).
And why generate migrations through gii if there is a special console command
php yii migrate/create migrate_name for this ? If you make migrations using this command, then the files will be added where they should be.
ps Through gii do not create migrations)))
Writes that there are no new migrants. Clean up the "migration" table, or use the command to update the tables.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question