Skip to content

A Yii2 Gii Code Generator to create basic new table migrations easily.

License

Notifications You must be signed in to change notification settings

wilwade/gii-migration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gii-migration

A Yii2 Gii Code Generator to create basic new table migrations easily.

Installation

The preferred way to install this extension is through composer.

"wilwade/gii-migration": "dev-master"

Usage

//if your gii modules configuration looks like below:
    $config['modules']['gii'] = 'yii\gii\Module';
// Replace this line
//Add this into common/config/main-local.php
    $config['modules']['gii'] = [
		'class' => 'yii\gii\Module',
		'generators' => [
			'giiMigration' => [
				'class' => 'wilwade\giiMigration\generators\migration\Generator',
				//Optional:
				'defaultColumns' => [],
				'baseClass' => 'yii\db\Migration',
			],
		],
    ],

Optional Config

  • defaultColumns: Used to have an array of columns that will be added if the include default columns checkbox is checked
  • baseClass: Used if you want to extend something besides the default Migration class

About

A Yii2 Gii Code Generator to create basic new table migrations easily.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages