From 277357277fc3781e6b1818a5b37efb5c5e9c9961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Guillot?= Date: Sun, 12 Feb 2023 19:37:15 -0800 Subject: [PATCH] Command db:migrate should work even if DB_RUN_MIGRATIONS is false Fixes #4818 --- cli | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cli b/cli index 8d82cc5d6..83d48791b 100755 --- a/cli +++ b/cli @@ -1,6 +1,7 @@ #!/usr/bin/env php dispatch('app.bootstrap', new Event); - $container['cli']->run(); + + $input = new ArgvInput(); + + if (! in_array($input->getFirstArgument(), ['db:migrate', 'db:version'])) { + $container['dispatcher']->dispatch('app.bootstrap', new Event); + } + + $container['cli']->run($input); } catch (Exception $e) { echo $e->getMessage().PHP_EOL; exit(255);