hscstudio / yii2-mimin

Simple RBAC Manager for Yii2 (minify of yii2-admin)
51 stars 33 forks source link

migrations not work correctly yii2 2.0.6 #1

Closed dyar74 closed 9 years ago

dyar74 commented 9 years ago

work when replace on : $tableOptions = null; $this->createTable('{{%route}}', [ 'name' => Schema::TYPE_STRING . '(64) NOT NULL', 'alias' => Schema::TYPE_STRING . '(64) NOT NULL', 'type' => Schema::TYPE_STRING . '(64) NOT NULL', 'status' => Schema::TYPE_SMALLINT . ' NOT NULL', 'PRIMARY KEY (name)' ], $tableOptions);

But I not set status default value to 1.

hscstudio commented 9 years ago

I have done create dual migration.. for older version of yii (<2.0.6)

dyar74 commented 9 years ago

Thanks!

dyar74 commented 9 years ago

You have some mistake in migrations: line 21 : now - ]), $tableOptions); => work : ], $tableOptions); in main file. and in old folder: <?php use yii\db\Schema; use yii\db\Migration; class m151027_142811_create_route_table extends Migration { public function up() { <?php use yii\db\Schema; use yii\db\Migration; class m151024_072453_create_route_table extends Migration { public function up() { may be not correct git merge :)

hscstudio commented 9 years ago

kk.. yes I have repaired it .. thx