Repository navigation
docs: count both 0014 migrations and say to keep them - #128
Merged
Merged
Conversation
#124 and #125 were merged one after the other and both added a migration numbered 0014. Wrangler records migrations by file name, so both apply, and renaming either would apply it again on app.fctl.sh, where both already ran. The self-hosting guide now shows a new server applying 15 migrations, and AGENTS.md says to keep migration names as they are.
kalaspuff
approved these changes
Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows #125 and #126.
#125 (
0014_workspace_skip_invites.sql) and #124 (0014_session_pull_requests.sql) were open together and merged one after the other, somainhas two migrations numbered 0014. Nothing breaks: wrangler records migrations by file name and applies every file it hasn't recorded (getUnappliedMigrationNames), and its next number is the highest plus one, so the next migration is 0015. The two add columns to different tables (workspacesandsessions), so their order doesn't matter. app.fctl.sh applied #125's at its deploy (0014_workspace_skip_invites.sql ✅) before #124's.Renaming either file is what would break: wrangler would see a new name and run its
ALTER TABLE … ADD COLUMNagain, which fails on a database that has the column. So:docs/self-hosting.md: a new standalone server now applies 15 migrations, not 14 (docs: show the 14 migrations a new standalone server applies #126 counted before feat: list every pull request a session opens, with its repository #124 was merged).AGENTS.md: the migration rule now says names are part of what's immutable, to number a new migration after the highest, and to leave the two 0014s as they are.Verification
On this branch (
mainat 8b4b699, plus these lines):FCTL_SETUP_TOKEN=dev-setup-token cargo xtask servewith a new data directory logsApplied 15 database migrations,cargo xtask dev --smoke --server http://localhost:8787passed through it, andfctl workspaces set --skip-invites onreturned"skip_invites": truefrom it. The branch merges cleanly withmainat b580d52 (#127), which adds no migration.Session: https://app.fctl.sh/s/ses_01M5CCM54M0DDN4RFRH5J5C0KW