slayer911/yii2-dbcast

Auto migration

Installs: 959

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 0

Open Issues: 1

Type:yii2-extension

1.0.4 2025-04-15 14:58 UTC

This package is auto-updated.

Last update: 2025-04-15 14:59:29 UTC


README

Automatic generation of migration when changing the database schema. The module creates a snapshot of the previous database schema and the current one.

Currently, supports only MySql

Install

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

After installing the vendor, create the 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

The standard Yii controller has been extended with the DbCast Migrate controller. You now have the following commands: newcommands

  • migrate/cast-commit

castcommit