Add documentation on how to apply/mark migrations to existing projects #172
This commit is contained in:
committed by
Julian Böhnke
parent
ac1cac4ff7
commit
6ee63d2916
@ -11,6 +11,11 @@ composer remove dektrium/yii2-user
|
|||||||
composer remove dektrium/yii2-rbac
|
composer remove dektrium/yii2-rbac
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Install yii2-usuario
|
||||||
|
```
|
||||||
|
composer add 2amigos/yii2-usuario
|
||||||
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
Configure the `config/console.php` stuff:
|
Configure the `config/console.php` stuff:
|
||||||
@ -114,6 +119,19 @@ This functionality has been dropped. Use `deny` rule in your configuration direc
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Mark migrations as applied in an existing project
|
||||||
|
|
||||||
|
If you already have a production project which has all the necessary user tables from dektrium simply run the following commands to
|
||||||
|
mark some migrations as already applied.
|
||||||
|
|
||||||
|
```
|
||||||
|
./yii migrate/mark "Da\User\Migration\m000000_000005_add_last_login_at"
|
||||||
|
./yii migrate/to "Da\User\Migration\m000000_000007_enable_password_expiration"
|
||||||
|
```
|
||||||
|
|
||||||
|
The first command will mark the migration as applied, the second will apply missing migrations.
|
||||||
|
The second command is optiona as a simple ```./yii migrate/up``` would apply all missing migrations anyway.
|
||||||
|
|
||||||
## Rbac migrations
|
## Rbac migrations
|
||||||
|
|
||||||
[yii2-rbac](https://github.com/dektrium/yii2-rbac) have a nice tool which are rbac migrations, which help writing new permissions and roles.
|
[yii2-rbac](https://github.com/dektrium/yii2-rbac) have a nice tool which are rbac migrations, which help writing new permissions and roles.
|
||||||
|
|||||||
Reference in New Issue
Block a user