Answer the question
In order to leave comments, you need to log in
How to change column in migration after creation?
In a migration, when creating, you can specify for a column, for example
$this->string()->after('column2')->defaultValue('test')->notNull()
Answer the question
In order to leave comments, you need to log in
www.yiiframework.com/doc-2.0/yii-db-migration.html...
$this->alterColumn('user','score','integer NOT NULL');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question