yiimaker / yii2-gii-migration
Yii2 Gii Migration
Installs: 3 736
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 2
Forks: 1
Open Issues: 0
Type:yii2-extension
Requires
- bower-asset/jquery-ui: ^1.0.0
- unclead/yii2-multiple-input: ~2.0
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2025-03-14 05:26:54 UTC
README
Migration generator for Gii
Installation
Install package
Run command
composer require yiimaker/yii2-gii-migration
or add
"yiimaker/yii2-gii-migration": "~1.0"
to the require section of your composer.json.
Usage
Configure generator in Gii module configuration
'modules' => [ 'gii' => [ // ... 'generators' => [ // ... 'migration' => [ 'class' => \ymaker\gii\migration\Generator::class, ], ], ], ],
Fields
Field | Type | Default | Description |
---|---|---|---|
$migrationPath |
string |
'@console/migrations' |
the path to the folder in which the migration file will be generated |
$db |
string |
db |
connection to a database |
$fields |
array |
none |
table fields |
$foreignKeys |
array |
none |
table foreign keys |
$useTablePrefix |
bool |
true |
use table prefix |
$tableName |
string |
none |
table name |
$migrationName |
string |
none |
migration name |
$translationPostfix |
string |
'_translation' |
postfix for translation table name |
$translationRefColumn |
string |
'id' |
name for model column |
$translationTableColumn |
string |
'model_id' |
name for translation model column |
$translationLanguageTableName |
string |
'language' |
language table name |
$translationLanguageColumnRefName |
string |
code |
language column name in language table |
$translationLanguageColumnName |
string |
'language' |
language column name for translation table |
$translationLanguageColumnType |
string |
string |
language column type |
$translationLanguageColumnParam |
string |
null |
language column param |
License
This project is released under the terms of the BSD-3-Clause license.
Copyright (c) 2017, Yii Maker