Remove orphaned duplicate apikey migration#1
Draft
nearbycoder wants to merge 1 commit into
Draft
Conversation
drizzle/0002_wonderful_thunderbolt.sql is byte-for-byte equivalent to 0001_api_key_support.sql (both CREATE TABLE "apikey") and is not referenced in drizzle/meta/_journal.json. It's a leftover from migration generation that the runtime migrator already ignores, but it conflicts with the 0002_share_link_expiry.sql prefix and would cause a duplicate- table error if the journal were ever regenerated to include it.
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.
Summary
Deletes
drizzle/0002_wonderful_thunderbolt.sql, which is an orphaned migration file that:drizzle/0001_api_key_support.sql(bothCREATE TABLE "apikey"with the same columns, FK, and indexes).drizzle/meta/_journal.json— the journal already lists0001_api_key_support,0002_share_link_expiry, and0003_long_jimmy_woo, but never thewonderful_thunderbolttag, so the runtime migrator silently skips it today.0002_numeric prefix with0002_share_link_expiry.sql, which is invalid for drizzle. If anyone ever regenerated the journal to include it, the migrator would either fail with a duplicate-prefix conflict or attempt to re-create the existingapikeytable and crash on every fresh deploy.Removing it brings the filesystem back in sync with the journal and eliminates the latent footgun.
Verification
drizzle/meta/_journal.jsondoes not reference thewonderful_thunderbolttag, so no runtime behavior changes.0001_api_key_support.sqlcontinues to create theapikeytable identically.src/references the file.Follow-up (not in this PR)
There are pre-existing inconsistencies in
drizzle/meta/worth a separate look:0001_snapshot.jsonis missing entirely.0002_snapshot.jsonand0003_snapshot.jsonboth haveprevIdpointing back to0000_snapshot.json's id, instead of forming a proper chain.These don't affect
drizzle-kit migrateat runtime, but the nextdrizzle-kit generatewill likely produce conflicts. Recommend regenerating snapshots against a fresh baseline in a follow-up PR.Pull Request opened by Augment Code | View session