Merge pull request #192 from tsdogs/issue172final
Add documentation on how to apply/mark migrations to existing project…
This commit is contained in:
@ -11,6 +11,11 @@ composer remove dektrium/yii2-user
|
||||
composer remove dektrium/yii2-rbac
|
||||
```
|
||||
|
||||
## Install yii2-usuario
|
||||
```
|
||||
composer require 2amigos/yii2-usuario
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
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 optional as a simple ```./yii migrate/up``` would apply all missing migrations anyway.
|
||||
|
||||
## 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.
|
||||
|
||||
Reference in New Issue
Block a user