documentation wip

This commit is contained in:
resurtm
2016-12-18 23:29:58 +06:00
parent 8b02351b6c
commit b4549f3a54
7 changed files with 65 additions and 38 deletions

View File

@ -1,40 +1,9 @@
Migrations
==========
Yii2 User
=========
Add the following settings to your console application configuration file:
![](./docs/media/yii-logo.svg "")
![](./docs/media/user-secret.svg "")
![](./docs/media/wrench.svg "")
![](./docs/media/cogs.svg "")
```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
```
© [2amigos](http://www.2amigos.us/) 2016