1 | <?php |
||
10 | class DatabaseRollbackCommand 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:rollback |
||
21 | {group : The name of the migration group.} |
||
22 | {--all : Includes all version.} |
||
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 = 'Database migrate to back to one or specifed version'; |
||
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) |
|
59 | |||
60 | /** |
||
61 | * Execute rollback. |
||
62 | * |
||
63 | * @param \Jumilla\Versionia\Laravel\Migrator $migrator |
||
64 | * @param string $target_group |
||
65 | * @param string $target_version |
||
66 | */ |
||
67 | protected function doRollback(Migrator $migrator, $target_group, $target_version) |
||
88 | } |
||
89 |