2017 © Pedro Peláez
 

yii2-extension yii2-migrations-advanced

Advanced migrations for Yii2

image

yiisolutions/yii2-migrations-advanced

Advanced migrations for Yii2

  • Monday, December 11, 2017
  • by memclutter
  • Repository
  • 2 Watchers
  • 1 Stars
  • 25 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 4 % Grown

The README.md

yii2-migrations-advanced

Advanced migrations for Yii2, (*1)

Installation

Use composer, (*2)

composer require "yiisolutions/yii2-migrations-advanced: @dev"

or add to composer.json require section:, (*3)

"yiisolutions/yii2-migrations-advanced": "@dev"

Usage

Add custom migrate command in config/console.php file:, (*4)

<?php

return [
    // ...
    'controllerMap' => [
        'migrate' => [
            'class' => 'yiisolutions\migrations\commands\MigrateController',
            // your config options here ...
        ],
    ],
    // ...
];

RBAC migrations

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 migration
  • create_[name]_permission - create new permission migration (options: description, ruleName)
  • drop_[name]_permission - drop exist permission migration.

The Versions

11/12 2017

dev-master

9999999-dev

Advanced migrations for Yii2

  Sources   Download

BSD-3-Clause

The Requires

 

by Memory Clutter

database migrations yii2 db migrate