1 | <?php |
||
10 | class DatabaseAgainCommand extends Command |
||
11 | { |
||
12 | use DatabaseCommandTrait; |
||
13 | use ConfirmableTrait; |
||
14 | |||
15 | /** |
||
16 | * The name and signature of the console command. |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $signature = 'database:again |
||
21 | {group : Group name} |
||
22 | {--seed= : Indicates if the seed task should be re-run.} |
||
23 | {--force : Force the operation to run when in production.} |
||
24 | '; |
||
25 | |||
26 | /** |
||
27 | * The console command description. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $description = 'Migrations rollback latest version and upgrade'; |
||
32 | |||
33 | /** |
||
34 | * Execute the console command. |
||
35 | * |
||
36 | * @param \Jumilla\Versionia\Laravel\Migrator $migrator |
||
37 | * |
||
38 | * @return mixed |
||
39 | */ |
||
40 | 2 | public function handle(Migrator $migrator) |
|
63 | |||
64 | /** |
||
65 | * Execute rollback and upgrade one version. |
||
66 | * |
||
67 | * @param \Jumilla\Versionia\Laravel\Migrator $migrator |
||
68 | * @param string $group |
||
69 | */ |
||
70 | protected function doAgain(Migrator $migrator, $group) |
||
103 | |||
104 | /** |
||
105 | * Check installed version. |
||
106 | * |
||
107 | * @param string $installed_version |
||
108 | * @param array $definition_versions |
||
109 | * |
||
110 | * @return bool |
||
111 | */ |
||
112 | protected function checkInstalledVersion($installed_version, array $definition_versions) |
||
139 | } |
||
140 |