addColumn yii migration position
Asked 07 September, 2021
Viewed 1.1K times
  • 55
Votes

I want to add a column at the seventh place in the table, I am using

$this->addColumn('table_name','column_name','type'); 

adds the column at the end. Is there any way where I can mention the place to add column? Or any after column keyword to add my new column after, for exapmle, password column. I have learnt aboout migration from Yii Doc

2 Answer