dev-master
9999999-devAdvanced migrations for Yii2
BSD-3-Clause
The Requires
by Memory Clutter
database migrations yii2 db migrate
Advanced migrations for Yii2
Advanced migrations for Yii2, (*1)
Use composer, (*2)
composer require "yiisolutions/yii2-migrations-advanced: @dev"
or add to composer.json
require section:, (*3)
"yiisolutions/yii2-migrations-advanced": "@dev"
Add custom migrate command in config/console.php
file:, (*4)
<?php return [ // ... 'controllerMap' => [ 'migrate' => [ 'class' => 'yiisolutions\migrations\commands\MigrateController', // your config options here ... ], ], // ... ];
Sometimes you need to create a migration for RBAC. Use RbacMigrateController for this:, (*5)
<?php return [ // ... 'controllerMap' => [ 'rbac-migrate' => [ 'class' => 'yiisolutions\migrations\commands\RbacMigrateController', ], ], // ... ];
For rbac-migrate/create
command available templates:, (*6)
create_[name]_role
- create new role migration (options: description, ruleName)drop_[name]_role
- drop exist role migrationcreate_[name]_permission
- create new permission migration (options: description, ruleName)drop_[name]_permission
- drop exist permission migration.Advanced migrations for Yii2
BSD-3-Clause
database migrations yii2 db migrate