Download the PHP package demmonico/yii2-migration without Composer
On this page you can find all versions of the php package demmonico/yii2-migration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package yii2-migration
Yii2 migration class
Description
Yii2 class Migration provide more flexibility usage interface then basic Yii2 class, so can be used instead of it. It is backward compatible with basic migration class.
Usage
This is a sample of some migration with new interface.
Properties
$tableName
is a table name. REQUIRED property. You can use constants instead (see below).$columns
is a list of columns. REQUIRED property. 'Created' and 'Updated' columns will be added automatically.$indexKeys
is a list of index keys. Use simple array if you want create simple index or use associative key ('phone_country' => true
) if you need to create unique key.$foreignKeys
is a list of foreign keys. Use simple array likeforeignKeyThisTable => relatedTableName
to create relation with column namedid
in related table or you can use associative array instead.$insertColumns
is a list of columns of insertion. Use it if you want insert some default data immediate after table creation.$insertRows
is a list of rows of insertion. Use it if you want insert some default data immediate after table creation.
You can use also some map interface to store table names in one place and use constants like self::TABLE_NAME
Also you can tune other options like:
$tableOptions
$isAutoAppendDateTime
$insertSingleColumnName
$insertCreatedColumnName
$insertUpdatedColumnName
$insertStatusUpdatedColumnName
All versions of yii2-migration with dependencies
PHP Build Version
Package Version
The package demmonico/yii2-migration contains the following files
Loading the files please wait ....