flexibuild / migrate
Helpful tools for yii2 migrations
Installs: 525
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: >=2.0.9
This package is not auto-updated.
Last update: 2024-12-31 05:10:17 UTC
README
Helpful tools for yii2 migrations.
With this extenension you can:
- forget about wrapping table names like
{{%table_name}}
, extension will do it automatically. - create indexes and foreign keys without inventing them names.
- create table without passing character set and collate. The extension will do it by default for MySQL databases.
- simply create migrations that create tables with exntending from
flexibuild\migrate\db\CreateTableMigration
. - and other small features.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist flexibuild/migrate "*"
or add
"flexibuild/migrate": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by configuring your console application:
return [ ... 'controllerMap' => [ ... 'migrate' => [ 'class' => 'flexibuild\migrate\controllers\MigrateController', ], ], ... ];
If you do not want to use migrate command from this extension you may be want simply to extend you migration class from one of:
flexibuild\migrate\db\Migration
flexibuild\migrate\db\CreateTableMigration