-
Notifications
You must be signed in to change notification settings - Fork 6
fix(cli): rewrite ALTER COLUMN to EQL v3 domains, not just eql_v2_encrypted #728
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 all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f628463
fix(cli): rewrite ALTER COLUMN to EQL v3 domains, not just eql_v2_enc…
tobyhede df59d2e
test(cli): make the install-migration skip test load-bearing
tobyhede 81e0957
fix(cli): correct backfill guidance and tighten the ALTER match
tobyhede a71b9a8
docs(cli): stop the sweep messages claiming populated-table safety
tobyhede 17a5dfe
fix(cli): address PR review on the v3 ALTER COLUMN rewriter
tobyhede 8dcbf05
fix(cli): re-surface incomplete ALTER sweep at install closing note
tobyhede 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,22 @@ | ||
| --- | ||
| 'stash': patch | ||
| --- | ||
|
|
||
| Fix invalid DDL when a Drizzle column changes to an EQL v3 domain. | ||
|
|
||
| `drizzle-kit generate` emits an in-place `ALTER TABLE … ALTER COLUMN … SET DATA TYPE` | ||
| when a plaintext column is changed to an encrypted one, which Postgres rejects — there | ||
| is no cast from `text`/`numeric` to an EQL type, and on drizzle-kit 0.31.0+ the emitted | ||
| type name is additionally mangled to `"undefined"."eql_v3_<name>"`. The migration | ||
| rewriter only recognised the EQL v2 type, so a v3 user was left with an un-runnable | ||
| migration and nothing to repair it. | ||
|
|
||
| The rewriter now matches the whole `eql_v3_*` domain family alongside `eql_v2_encrypted`, | ||
| across every mangled form observed from drizzle-kit 0.24 through 0.31, and emits the | ||
| matched domain in the replacement instead of a hardcoded v2 type. `stash eql migration | ||
| --drizzle` — the EQL v3 migration-first path — now runs the same sweep that `eql install | ||
| --drizzle` has always run, so the repair actually reaches v3 projects. | ||
|
|
||
| The rewrite's guidance comment now also warns that it drops the plaintext column in the | ||
| same migration, and points at the staged `stash encrypt` path (add → backfill → cutover → | ||
| drop) for populated production tables. |
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.