Auto generate migration by your changes DB schema. Module create cast of previous DB schema, and current.
Currently supports only MySql
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 ] ] ... ];