Repository navigation
fix(sqlite-adapter): leave out Prisma 7 migration ledger during introspection - #30684
Open
hemcharan710-afk wants to merge 1 commit into
Open
hemcharan710-afk wants to merge 1 commit into
hemcharan710-afk wants to merge 1 commit into
Conversation
…spection SqliteControlAdapter now leaves out _prisma_migrations during introspection unless explicitly declared in the contract, matching PostgresControlAdapter parity (PR prisma#30671). Signed-off-by: Hemcharan Varma <hemcharan710@gmail.com>
Contributor
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.
Linked issue
n/a — small bug fix
Summary
On SQLite databases created with Prisma 7,
SqliteControlAdapter.introspect()returned_prisma_migrations, causingprisma db verify --strictto fail withunclaimed: ["_prisma_migrations"],prisma contract inferto generate an unwanted model, andprisma db updateto plan dropping the table.SqliteControlAdapter.introspect()now leaves out_prisma_migrationsduring introspection unless it is explicitly declared in the contract.Testing performed
pnpm vitest run packages/3-targets/6-adapters/sqlite/test/control-adapter.tool-tables.test.ts(3 tests passed)pnpm --filter @internal/adapter-sqlite test(41 test files, 349 tests passed)pnpm --filter @internal/adapter-sqlite typecheck(0 errors)pnpm lint:deps && pnpm lint:code && pnpm lint:casts && pnpm lint:throws(all clean)Skill update
n/a — internal only
Checklist
Summary by CodeRabbit
_prisma_migrationsunless the supplied contract declares it. Other tables remain available for introspection._prisma_migrationsfrom schema and contract inference.