Download the PHP package darkfriend/yii2-data-migrate without Composer
On this page you can find all versions of the php package darkfriend/yii2-data-migrate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download darkfriend/yii2-data-migrate
More information about darkfriend/yii2-data-migrate
Files in darkfriend/yii2-data-migrate
Package yii2-data-migrate
Short Description RBAC management module for Yii2
License MIT
Homepage https://github.com/darkfriend/php7-helpers
Informations about the package yii2-data-migrate
Yii2 Test Data Migrate Extension
Yii2-Data-Migrate provides a test data control.
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json.
Usage
Once the extension is installed, simply modify your application configuration as follows:
After you downloaded and configured Yii2-data-migrate, the last thing you need to do is updating your database schema by applying the migration:
Migrations are located in the directory.
Migrations
You can create the console migrations for creating/updating RBAC items.
Module setup
To be able create the migrations, you need to add the following code to your console application configuration:
Creating Migrations
To create a new migration, run the following command:
The required name
argument gives a brief description about the new migration. For example, if the migration is about creating a new migrate, you may use the name create_migrate_name
and run the following command:
Applying Migrations
To upgrade a database to its latest structure, you should apply all available new migrations using the following command:
Reverting Migrations
To revert (undo) one or multiple migrations that have been applied before, you can run the following command:
Redoing Migrations
Redoing migrations means first reverting the specified migrations and then applying again. This can be done as follows: