fix(migrations): renumber to 0009 — core landed its own 0008
Four commits landed on core while this branch was in flight, and one of them added 0008_alter_sheets.sql. This branch had already added 0008_alter_formats_ink_intent.sql, so the rebase produced two migrations claiming the same number — cleanly, because they are different filenames that touch no common line. migrate.Apply is not harmed: its ledger keys on the migration ID, so both apply once and the checksum guard still holds. What breaks is the meaning of the number and the order between them, which falls out of filename sort rather than out of anyone's intent. Renumbered rather than left, and now rather than later: apply.go's own error says migrations are immutable once applied, so this was free only because this branch has never been deployed. Had it shipped first the rename would have been unavailable and the duplicate permanent — the window where this is cheap to fix is exactly the window where nothing tells you about it. Filed upstream as rastrillo/rastrillo discussion 13, asking that `migration check` refuse a duplicate number. Also: a comment of mine named createSheet, which core renamed to newSheet when it taught the function about half-imported sheets.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0182f7QfojuuqdS4Xd2fYFaL
2 files changed,
+1
−1
internal/sheets/migrations/{0008_alter_formats_ink_intent.sql => 0009_alter_formats_ink_intent.sql}+0 −0internal/sheets/sheetsvc.go+1 −1
CI passed — run details
Intent
Human
merge and deploy
Human
file and issue on amadan.net/rastrillo/rastrillo to have more uniquness in the migration number?
diff --git a/internal/sheets/migrations/0008_alter_formats_ink_intent.sql b/internal/sheets/migrations/0009_alter_formats_ink_intent.sql| similarity index 100% |
| rename from internal/sheets/migrations/0008_alter_formats_ink_intent.sql |
| rename to internal/sheets/migrations/0009_alter_formats_ink_intent.sql |
diff --git a/internal/sheets/sheetsvc.go b/internal/sheets/sheetsvc.go| index 5dc61e4..1a66551 100644 |
| --- a/internal/sheets/sheetsvc.go |
| +++ b/internal/sheets/sheetsvc.go |
| @@ -254,7 +254,7 @@ func (a *App) summarize(s store.Sheet) (SheetSummary, error) { |
| // |
| // The fallback is for a name that will not open — a row written under a |
| // key this process does not have. It is not for an empty NameSealed: |
| -// createSheet has always sealed firstTabName, so no tab this app has |
| +// newSheet has always sealed firstTabName, so no tab this app has |
| // made lacks one. Either way the answer is the same and it is the |
| // right one: the tab strip is chrome, and a grid nobody can open |
| // because its tab's name is unreadable is a worse outcome than a tab |