I
I
IvanMogilev2020-08-24 14:40:48
Yii
IvanMogilev, 2020-08-24 14:40:48

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

2 answer(s)
D
Dmitry, 2020-08-24
@IvanMogilev

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)))

B
Bogdan Khvalko, 2020-08-24
@quitting

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 question

Ask a Question

731 491 924 answers to any question