yii2-migration Yii 2 composer module migration helper

Yii 2 Dependencies Migration

  1. Installation
  2. Setup
  3. Usage

This is a small Composer module that helps you reuse your Yii 2 modules.


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": "*"


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"


  1. Create packages for all your modules you want to reuse.
  2. Create a migrations folder for modules that requires migrations.
  3. Add your migrations in the migration directory.

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.

1 0
Yii Version: 2.0
License: MIT
Category: Database
Developed by: ProXy
Created on: Dec 19, 2014
Last updated: 9 years ago

Related Extensions