You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add full-rollback option for production migrations
Usecase: running migrations during deploy should not alter the database
at all. It’s handy to only rollback the last migration during
development, so the original behaviour is retained.
Side effect: migrations are committed at once, not per single migration.
Also affects original continue mode, not just full rollback mode.
Original behaviour could have caused transient problems during deploy.
Copy file name to clipboardExpand all lines: src/Bridges/SymfonyConsole/ContinueCommand.php
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -25,13 +25,16 @@ protected function configure()
25
25
$this->setDescription('Updates database schema by running all new migrations');
26
26
$this->setHelp("If table 'migrations' does not exist in current database, it is created automatically.");
27
27
$this->addOption('production', NULL, InputOption::VALUE_NONE, 'Will not import dummy data');
28
+
$this->addOption('full-rollback', 'r', InputOption::VALUE_NONE, 'Upon failing, rollback all migrations, not only the failed on. <comment>Only works reliably with PostgreSQL.</comment>');
0 commit comments