slayer911/yii2-dbcast

dev-master 2017-07-17 13:55 UTC

README

Auto generate migration by your changes DB schema. Module create cast of previous DB schema, and current.

Currently supports only MySql

Install

composer require --dev "slayer911/yii2-dbcast:*"

After vendor was installed - create first DBCast.

 php yii migrate/cast-save

If in this step you have an error - add to console config (main-local.php) next data:

<?php
return [
    ...
    'controllerMap' => [
        'migrate' => [
            'class'   => \DBCast\controllers\MigrateController::class,
            'develop' => true
        ]
    ]
    ...
];

Using

Default Yii controller was extended by DbCast Migrate controller. Now you have next commands: newcommands

  • migrate/cast-commit

castcommit