Yii2 Migration Utility
Updated July 21, 2014
This is a simple utility that writes the create table statement for you. The table(s) must already exist.
It automatically writes out all:
Note: Foreign keys default to CASCADE / DELETE so you may need to manually change these.
Note: $tableOptions is added so make sure you have a var set.
Note: $dbType is used with the if/then statements.
$dbType = Yii::$app->db->driverName;
The preferred way to install this extension is through composer.
php composer.phar require --prefer-dist "c006/yii2-migration-utility" "dev-master"
to the require section of your
Update either config/web.php (basic) or config/main.php (advanced)
'modules' => [ ... ... ... 'utility' => [ 'class' => 'c006\utility\migration\Module', ], ],
The tables must already exist in website schema.
Workbench showing the user table:
Image of demo page:
If you see this error.
In this file
comment out these lines.
public $depends = [ // 'yii\web\YiiAsset', // 'yii\widgets\ActiveFormAsset', // 'yii\bootstrap\BootstrapAsset', ];
Please provide any helpful feedback or requests.