1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Reddogs\Doctrine\Migrations; |
4
|
|
|
|
5
|
|
|
class ModuleConfig |
6
|
|
|
{ |
7
|
|
|
public function __invoke() |
8
|
|
|
{ |
9
|
|
|
return [ |
10
|
|
|
'console_routes' => [ |
11
|
|
|
'mogrations:execute' => [ |
12
|
|
|
'name' => 'mogrations:execute', |
13
|
|
|
'route' => 'mogrations:execute <moduleName> [--version=] [--write-sql] [--dry-run] [--up] [--down] [--query-time] ' . |
14
|
|
|
'[--quiet|-q] [--no-interaction|-n] [--verbose|-v|-vv|-vvv]', |
15
|
|
|
'handler' => ExecuteCommand::class, |
16
|
|
|
], |
17
|
|
|
|
18
|
|
|
'mogrations:generate' => [ |
19
|
|
|
'name' => 'mogrations:generate', |
20
|
|
|
'route' => 'mogrations:generate <moduleName> [--quiet|-q] [--no-interaction|-n] [--verbose|-v|-vv|-vvv]', |
21
|
|
|
'description' => 'test route for testing purposes', |
22
|
|
|
'short_description' => 'test route', |
23
|
|
|
'handler' => GenerateCommand::class, |
24
|
|
|
], |
25
|
|
|
'mogrations:migrate' => [ |
26
|
|
|
'name' => 'mogrations:migrate', |
27
|
|
|
'route' => 'mogrations:migrate <moduleName> [--version=] [--dry-run] [--write-sql] [--query-time] ' . |
28
|
|
|
'[--quiet|-q] [--no-interaction|-n] [--verbose|-v|-vv|-vvv]', |
29
|
|
|
'description' => 'test route for testing purposes', |
30
|
|
|
'short_description' => 'test route', |
31
|
|
|
'handler' => MigrateCommand::class, |
32
|
|
|
], |
33
|
|
|
'mogrations:latest' => [ |
34
|
|
|
'name' => 'mogrations:latest', |
35
|
|
|
'route' => 'mogrations:latest <moduleName>', |
36
|
|
|
'handler' => LatestCommand::class, |
37
|
|
|
], |
38
|
|
|
'mogrations:status' => [ |
39
|
|
|
'name' => 'mogrations:status', |
40
|
|
|
'route' => 'mogrations:status <moduleName>', |
41
|
|
|
'handler' => StatusCommand::class, |
42
|
|
|
], |
43
|
|
|
], |
44
|
|
|
'dependencies' => [ |
45
|
|
|
'factories' => [ |
46
|
|
|
ExecuteCommand::class => ExecuteCommandFactory::class, |
47
|
|
|
GenerateCommand::class => GenerateCommandFactory::class, |
48
|
|
|
LatestCommand::class => LatestCommandFactory::class, |
49
|
|
|
MigrateCommand::class => MigrateCommandFactory::class, |
50
|
|
|
StatusCommand::class => StatusCommandFactory::class, |
51
|
|
|
] |
52
|
|
|
] |
53
|
|
|
]; |
54
|
|
|
} |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
|