Skip to content

Commit 83b2375

Browse files
Jalle19patrickbrouwers
authored andcommitted
Fix rollback in production, drop unused trait (#63)
* Add missing --force option to ExecuteCommand This command is called by doctrine:migrate:rollback, without this rollbacks cannot be applied in production Fixes #58 * Actually use ConfirmableTrait in ResetCommand
1 parent 99f43b7 commit 83b2375

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Console/ExecuteCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ class ExecuteCommand extends Command
2121
{--dry-run : Execute the migration as a dry run. }
2222
{--up : Execute the migration up. }
2323
{--down : Execute the migration down. }
24-
{--query-time : Time all the queries individually.}';
24+
{--query-time : Time all the queries individually.}
25+
{--force : Force the operation to run when in production. }';
2526

2627
/**
2728
* @var string

src/Console/ResetCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ class ResetCommand extends Command
3636
*/
3737
public function handle(ConfigurationProvider $provider)
3838
{
39+
if (!$this->confirmToProceed()) {
40+
return;
41+
}
42+
3943
$configuration = $provider->getForConnection(
4044
$this->option('connection')
4145
);

0 commit comments

Comments
 (0)