Commit d670bbc
authored
fix(cli): use migrateToLatest command name for
Both Module.cfc and MigrationRunner.cfc were mapping the user-visible
`latest` action to the framework HTTP command name `migrateTo`. The
framework's `/wheels/cli` endpoint treats `migrateTo` as "migrate to a
specific version" — and silently no-ops when no version parameter is
provided. The correct command name is `migrateToLatest`, which the
endpoint dispatches via `migrator.migrateToLatest()`.
Without this fix, `wheels migrate latest` exits 0 with the message
"Migration latest completed." in green, but no migration is actually
applied. The first VM-test journal observed this as "Migrating from 0
down to ." (the framework rolling back to nothing); the second VM-test
journal observed it as a 0-byte database file with no schema. Both
green CLI output, both broken framework behavior.
A `&version=` empty appendix in Module.cfc (with a misleading comment
claiming "omitting it runs to latest") was the smoking gun — that comment
described the author's intent, not the framework's actual behavior.
Discovered via local fresh-install harness (tools/test-onboarding.sh)
which simulates a brand-new user running `wheels new` + `wheels migrate
latest` in an isolated LUCLI_HOME and verifies the resulting sqlite
database actually contains the migrated tables.
Reported as F2 / F5 in two consecutive VM-onboarding runs.wheels migrate latest (#2307)1 parent 6e77607 commit d670bbc
2 files changed
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2760 | 2760 | | |
2761 | 2761 | | |
2762 | 2762 | | |
2763 | | - | |
| 2763 | + | |
2764 | 2764 | | |
2765 | 2765 | | |
2766 | 2766 | | |
2767 | 2767 | | |
2768 | 2768 | | |
2769 | 2769 | | |
2770 | | - | |
2771 | | - | |
2772 | | - | |
2773 | | - | |
2774 | 2770 | | |
2775 | 2771 | | |
2776 | 2772 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
0 commit comments