From ee11f33fffcd42dc4d31da0fbb43d9f98e73a52b Mon Sep 17 00:00:00 2001 From: resurtm Date: Tue, 13 Dec 2016 13:50:01 +0600 Subject: [PATCH] initial readme file --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..aff25f2 --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +Migrations +========== + +Add the following settings to your console application configuration file: + +```php +return [ + // ... + 'controllerMap' => [ + 'migrate' => [ + 'class' => \yii\console\controllers\MigrateController::class, + 'migrationNamespaces' => [ + 'Da\User\Migration', + ], + ], + ], + // ... +]; +``` + +This will allow you to run only a single console command: + +``` +./yii migrate +``` + +It prevents you from manual tracking of new migrations coming from our extension. What if we would add a new migration class, and you forgot to run appropriate console command to launch them? + +Without namespaced migrations it would be: + +``` +./yii migrate +./yii migrate --migrationPath="@Da/User/resources/migrations" +``` + +Without namespaced migrations it's just: + +``` +./yii migrate +```