2017 © Pedro Peláez
 

yii2-extension yii2-migration-aware-module

Migration aware module extension for Yii2.

image

indigerd/yii2-migration-aware-module

Migration aware module extension for Yii2.

  • Thursday, January 18, 2018
  • by Indigerd
  • Repository
  • 1 Watchers
  • 2 Stars
  • 2,873 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 4 Versions
  • 20 % Grown

The README.md

yii2-migration-aware-module

Yii2 extension that allows modules to store migrations in their own folders and make them available for yii/migrate command, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require "indigerd/yii2-migration-aware-module" "*", (*4)

or add, (*5)

"indigerd/yii2-migration-aware-module" : "*", (*6)

to the require section of your application's composer.json file., (*7)

Usage

In your console config file in your migration section replace with class property and add configFiles array property. configFiles is array of configs where component will scan for your migration aware modules. By default configFiles contains backend and frontend configs from advanced application template. For example:, (*8)

        'migrate'=>[
            'class' => 'indigerd\migrationaware\controllers\MigrateController',
            'configFiles' => [
                '@backend/config/web.php',
                '@frontend/config/web.php',
                '@someAnotherAliasHere/config/web.php',
            ],

            'migrationPath'=>'@common/migrations/db', //leave as it was before
            'migrationTable'=>'{{%system_db_migration}}' //leave as it was before
        ],

In your modules that have migrations your need either to implement indigerd\migrationaware\MigrationAwareInterface or to extend from indigerd\migrationaware\MigrationAwareModule. If you will implement interface you should implement method getMigrationPath and return in it folder which contains your module migrations. For example:, (*9)

    public function getMigrationPath()
    {
        return __DIR__.'/migrations';
    }

License

yii2-migration-aware-module is released under the MIT License. See the bundled LICENSE file for details., (*10)

The Versions

18/01 2018

dev-master

9999999-dev

Migration aware module extension for Yii2.

  Sources   Download

MIT

The Requires

 

by Alexander Stepanenko

component extension migration module yii

18/01 2018

V1.0.3

1.0.3.0

Migration aware module extension for Yii2.

  Sources   Download

MIT

The Requires

 

by Alexander Stepanenko

component extension migration module yii

08/07 2016

v1.0.2

1.0.2.0

Migration aware module extension for Yii2.

  Sources   Download

MIT

The Requires

 

by Alexander Stepanenko

component extension migration module yii

05/02 2016

v1.0.1

1.0.1.0

Migration aware module extension for Yii2.

  Sources   Download

MIT

The Requires

 

by Alexander Stepanenko

component extension migration module yii