-
Notifications
You must be signed in to change notification settings - Fork 5
feat(nextly): execute and verify the field group storage migration's steps #423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 26 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
cfaf32b
refactor(nextly): make the recorded plan the authority a resume executes
mobeenabdullah f67bfaa
feat(nextly): pair each table rename with its registry pointer update
mobeenabdullah 900f883
fix(nextly): refuse schema sync while a storage migration is in flight
mobeenabdullah 39b6b64
feat(nextly): observe migration storage through the existing introspe…
mobeenabdullah 211d827
chore(release): add changeset for the field group migration DDL slice
mobeenabdullah a79df78
fix(nextly): bind pointer updates the way each driver expects, and ch…
mobeenabdullah 9d8ce40
fix(nextly): resolve introspected table names under the server's case…
mobeenabdullah cfda80c
fix(nextly): move a companion with its owner and the pointer together
mobeenabdullah 2de2115
fix(nextly): re-check the migration marker on every watched re-sync
mobeenabdullah d02993e
fix(nextly): identify a resume by registry row, not by slug alone
mobeenabdullah 3c7d601
fix(nextly): gather a column step's observations before its transaction
mobeenabdullah 179e7f1
fix(nextly): scope postgres index introspection to the public schema
mobeenabdullah a2caac5
feat(adapter-drizzle): run drizzle statements against tables the regi…
mobeenabdullah e728527
fix(nextly): move a companion on its owner's entry rather than beside it
mobeenabdullah 22400f7
docs(release): describe the migration's per-dialect commit behaviour …
mobeenabdullah abfec9a
fix(nextly): include a row's companion in the migration's registry id…
mobeenabdullah 1a48785
fix(nextly): hold the migration exclusion for a whole sync rather tha…
mobeenabdullah f3f1fff
fix(nextly): tie a recorded migration step to the build that produced it
mobeenabdullah 1839483
fix(adapter-drizzle): refuse an unrecognised statement result instead…
mobeenabdullah dc5626d
fix(nextly): treat a database with no meta table as one that never mi…
mobeenabdullah 82c116d
test(nextly): cover a field group repointed at a target its run has n…
mobeenabdullah 38359b3
fix(nextly): keep an interrupted schema sync from stranding the migra…
mobeenabdullah ff987ec
fix(nextly): reach the migration lock table without the schema registry
mobeenabdullah 0e1a40e
fix(nextly): keep a settled marker readable across marker versions
mobeenabdullah 3866d07
fix(nextly): hold a migration's claim through an interrupt, release o…
mobeenabdullah 27442f6
test(nextly): exercise the migration lock against a live postgres server
mobeenabdullah 85b1963
fix(nextly): keep an in-flight migration away from HMR and boot-time …
mobeenabdullah 9255f6c
fix(nextly): hold the migration exclusion across an HMR reload, not j…
mobeenabdullah File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| --- | ||
| "nextly": patch | ||
| "create-nextly-app": patch | ||
| "@nextlyhq/admin": patch | ||
| "@nextlyhq/admin-css": patch | ||
| "@nextlyhq/blocks-engine": patch | ||
| "@nextlyhq/ui": patch | ||
| "@nextlyhq/adapter-drizzle": patch | ||
| "@nextlyhq/adapter-postgres": patch | ||
| "@nextlyhq/adapter-mysql": patch | ||
| "@nextlyhq/adapter-sqlite": patch | ||
| "@nextlyhq/storage-s3": patch | ||
| "@nextlyhq/storage-uploadthing": patch | ||
| "@nextlyhq/storage-vercel-blob": patch | ||
| "@nextlyhq/plugin-form-builder": patch | ||
| "@nextlyhq/plugin-page-builder": patch | ||
| "@nextlyhq/plugin-seo": patch | ||
| "@nextlyhq/plugin-sdk": patch | ||
| "@nextlyhq/eslint-config": patch | ||
| "@nextlyhq/prettier-config": patch | ||
| "@nextlyhq/telemetry": patch | ||
| "@nextlyhq/tsconfig": patch | ||
| --- | ||
|
|
||
| Fixes PostgreSQL index introspection reading indexes from the wrong table. Table names are unique per schema rather than per database, so a table with the same name in another schema had its indexes merged into the one being inspected. That could hide an index that needed creating, or report one that was never there. | ||
|
|
||
| Refuses to run a schema sync while a field group storage migration is in flight. Mid-run some tables carry their old names and some their new ones, and the registry rows pointing at them move one step at a time, so a sync during that window could delete storage it could not account for. | ||
|
|
||
| Also further groundwork for that migration: it can now execute its rename steps and check its own work. A table, its localization companion and the registry row pointing at them move as one step, and on PostgreSQL and SQLite they commit together. MySQL applies a schema change as soon as it is issued, so there the halves land in sequence and a resume completes whatever did not; a reader in that window sees a table as missing rather than reading anything wrong. Every step verifies against the database rather than trusting that it ran, and index survival is checked by name, so an index dropped and replaced by another is caught rather than passing on an unchanged count. Nothing calls the migration itself yet. |
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.