Skip to content

Commit ca1b74e

Browse files
authored
Fix misleading next steps message in upgrade command (#1037)
Only show 'Set legacyTables => false' step after tables have been dropped, as the upgrade command becomes unavailable once this config is set. Fixes #1036
1 parent 9d74ef7 commit ca1b74e

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/Command/UpgradeCommand.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,13 @@ public function execute(Arguments $args, ConsoleIo $io): ?int
156156
$io->success('Upgrade complete!');
157157
$io->out('');
158158
$io->out('Next steps:');
159-
$io->out(' 1. Set <info>\'Migrations\' => [\'legacyTables\' => false]</info> in your config');
160-
$io->out(' 2. Test your application');
161-
if (!$dropTables) {
162-
$io->out(' 3. Optionally drop the empty phinxlog tables (re-run `bin/cake migrations upgrade --drop-tables`)');
159+
if ($dropTables) {
160+
$io->out(' 1. Set <info>\'Migrations\' => [\'legacyTables\' => false]</info> in your config');
161+
$io->out(' 2. Test your application');
162+
} else {
163+
$io->out(' 1. Test your application');
164+
$io->out(' 2. Drop the phinxlog tables (re-run `bin/cake migrations upgrade --drop-tables`)');
165+
$io->out(' 3. Set <info>\'Migrations\' => [\'legacyTables\' => false]</info> in your config');
163166
}
164167
} else {
165168
$io->out('');

0 commit comments

Comments
 (0)