ivanovyordan / yii2-migration
Yii 2 composer module migration helper
Installs: 851
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/ivanovyordan/yii2-migration
Requires
- php: >=5.4.0
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2025-12-06 23:09:38 UTC
README
This is a small Composer module that helps you reuse your Yii 2 modules.
Installation
Either run the following command in your project root:
php composer.phar require --prefer-dist ivanovyordan/yii2-migration "*"
or add this to the require section of your composer.json file:
"ivanovyordan/yii2-migration": "*"
Setup
Add the following to two rows to the scripts sections in your composer.json file:
"post-install-cmd": "ivanovyordan\\migration\\Migration::migrate",
"post-update-cmd": "ivanovyordan\\migration\\Migration::migrate"
Usage
- Create packages for all your modules you want to reuse.
- Create a
migrationsfolder for modules that requires migrations. - Add your migrations in the
migrationdirectory.
Following these three steps will give you the chance to reuse and redistribute and update your modules without the need to manually do your migrations.