Repository navigation
fix(cli): follow drizzle-kit's reported path for drop migrations - #1552
Draft
cipherstash-agent wants to merge 1 commit into
Draft
cipherstash-agent wants to merge 1 commit into
cipherstash-agent wants to merge 1 commit into
Conversation
…grations encrypt drop and decrypt drop scanned --migrations-dir for the file drizzle-kit wrote, ignoring the out in drizzle.config.ts. When the two differed, the SQL overwrote an older same-stem migration while drizzle-kit journaled an empty stub in the real out, so the DROP never shipped. Use the path drizzle-kit reports (shared with eql migration), fall back to an exact-suffix scan that refuses pre-existing files, and refuse to overwrite any non-empty file. Warn when --migrations-dir is overridden. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Jmn7rkoV6gTBkz2uGSR3H
🦋 Changeset detectedLatest commit: c2798f0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true |
This branch has not been deployed
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.
Requested by CipherStash · project thread
Summary
stash encrypt dropandstash decrypt dropcould write a Drizzle drop migration to the wrong folder (CIP-5162). They randrizzle-kit generate --custom, then looked for the file in--migrations-dir(default./drizzle) instead of theoutindrizzle.config.ts. When the two differed, drizzle-kit journaled an empty stub in the realout, and the SQL was either lost or written over an older same-stem migration.drizzle-kit migratethen applied the empty stub, so the DROP never shipped.Changes
scaffoldDrizzleMigrationnow uses the path drizzle-kit reports on stdout, aseql migrationalready does afterstash eql migration --drizzleaborts when DATABASE_URL lives in.env.local— stranding users on drizzle-kit's broken"undefined"."eql_v3_*"DDL #924. The two commands share one module,commands/db/drizzle-migration.ts._<stem>.sqlsuffix and rejects a file that existed before the run.--migrations-dirnow warns when drizzle-kit wrote elsewhere.--migrations-dirhelp text,skills/stash-cli/SKILL.mdand added astashpatch changeset.decrypt planis not affected: on Drizzle projects it writes no file.Verification
drizzle-helper.test.ts(7 cases): configoutdiffering from--migrations-dir, fallback scan, refusal to overwrite, colourised banner, error output.find-generated-migrationtests pass; Biome reports no errors.@cipherstash/authbinding isn't built in this environment, so about 27 unrelated test files can't load.Related
Linear CIP-5162.
Generated by Claude Code