|
1 | 1 | <?php |
2 | 2 |
|
3 | | -\Yii::setAlias('@app', dirname(__DIR__) . '/app'); |
4 | | -\Yii::setAlias('@webroot', dirname(__DIR__) . '/public'); |
| 3 | +\Yii::setAlias('@srcPath', dirname(__DIR__)); |
| 4 | +\Yii::setAlias('@app', '@srcPath/app'); |
| 5 | +\Yii::setAlias('@webroot', '@srcPath/public'); |
5 | 6 |
|
6 | 7 | $db = require __DIR__ . '/db.php'; |
7 | 8 | $settings = require __DIR__ . '/settings.php'; |
8 | 9 |
|
9 | 10 | $config = [ |
10 | | - 'id' => 'main-console', |
11 | | - 'basePath' => dirname(__DIR__) . '/app', |
12 | | - 'runtimePath' => dirname(__DIR__) . '/runtime', |
13 | | - 'vendorPath' => dirname(__DIR__) . '/vendor', |
| 11 | + 'id' => 'main-console', |
| 12 | + 'basePath' => '@app', |
| 13 | + 'runtimePath' => '@srcPath/runtime', |
| 14 | + 'vendorPath' => '@srcPath/vendor', |
14 | 15 | 'controllerNamespace' => 'app\\console', |
15 | 16 | 'bootstrap' => ['log', 'settings'], |
16 | 17 | 'aliases' => [ |
17 | | - '@config'=> dirname(__DIR__) . '/config', |
18 | | - '@migrations' => dirname(__DIR__) . '/database/migrations', |
19 | | - '@fixtures' => dirname(__DIR__) . '/database/fixtures', |
| 18 | + '@config'=> '@srcPath/config', |
| 19 | + '@migrations' => '@srcPath/database/migrations', |
| 20 | + '@fixtures' => '@srcPath/database/fixtures', |
20 | 21 | '@app/fixtures' => '@fixtures', |
21 | 22 | ], |
22 | 23 | 'controllerMap' => [ |
23 | 24 | 'migrate' => [ |
24 | | - 'class' => \app\modules\base\console\MigrateController::class, |
| 25 | + 'class' => \yii\console\controllers\MigrateController::class, |
| 26 | + 'templateFile' => '@migrations/templates/migration.php', |
| 27 | + 'generatorTemplateFiles' => [ |
| 28 | + 'create_table' => '@migrations/templates/createTableMigration.php', |
| 29 | + 'drop_table' => '@migrations/templates/dropTableMigration.php', |
| 30 | + 'add_column' => '@migrations/templates/addColumnMigration.php', |
| 31 | + 'drop_column' => '@migrations/templates/dropColumnMigration.php', |
| 32 | + 'create_junction' => '@migrations/templates/createTableMigration.php', |
| 33 | + ], |
25 | 34 | 'migrationPath' => [ |
26 | 35 | '@migrations', |
27 | 36 | '@yii/rbac/migrations', |
|
0 commit comments