Answer the question
In order to leave comments, you need to log in
Why are all migrations applied?
trying to apply specific migration like this
php yii migrate/to m170927_133748_add_user_bonus_from_user.php
Yii Migration Tool (based on Yii v2.0.11.2)
Total 2 new migrations to be applied:
m170918_210855_add_mounth_bonus_column_to_user_bonus_item_table
m170927_133748_add_user_bonus_from_user
Apply the above migrations? (yes|no) [no]:
Answer the question
In order to leave comments, you need to log in
Reading the docs:
Which approximately means:
if there was something there before, we will definitely apply it too
. So answering your question "Why are all migrations applied", I answer:
not all, but not applied, and only those up to the one you specified. And because it's meant to be.
So either it was necessary to spread them:
www.yiiframework.com/doc-2.0/guide-db-migrations.h...
Or manipulate the history by changing the timestamp to between them:
www.yiiframework.com/doc-2.0 /guide-db-migrations.h...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question