diff --git a/docs/installation/migration-guide-from-dektrium-tools.md b/docs/installation/migration-guide-from-dektrium-tools.md index 80da4eb..e84c4b5 100644 --- a/docs/installation/migration-guide-from-dektrium-tools.md +++ b/docs/installation/migration-guide-from-dektrium-tools.md @@ -11,6 +11,11 @@ composer remove dektrium/yii2-user composer remove dektrium/yii2-rbac ``` +## Install yii2-usuario +``` +composer add 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 optiona 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.