vnukga / yii2-migration-generator
Allows to generate migrations from scheme inexternal sources, such as Google Spreadsheets, using console.
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2025-06-19 06:42:35 UTC
README
Allows to generate migrations from scheme inexternal sources, such as Google Spreadsheets, using console.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist vnukga/yii2-migration-generator "*"
or add
"vnukga/yii2-migration-generator": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, add the following code to "controllerMap" section in 'console/config/main.php' :
'migrate-generator' => [
'class' => 'vnukga\migrationGenerator\MigrateController',
'sourceClass' => 'vnukga\migrationGenerator\sources\google\GoogleApiSheet',
'sourceId' => 'Your Google-Sheet ID',
'useGii' => true, //this allows you to generate models and GRUD's automatically
'modelNamespace' => 'common\models',
'keyPath' => 'Your path to a folder with credentials file' //__DIR__ . '/../../google'
]