prisma-engines
28948adc - test(schema-engine): cover the shadow database consent gate

Commit
53 days ago
test(schema-engine): cover the shadow database consent gate The dirty shadow database is a table the tests put there themselves, standing in for whatever a real database holds: replaying a migration history into it is refused with P3026 on the dev path and on the diff path alike, and the table is still there afterwards, which is the whole point. A shadow database holding nothing but `_prisma_migrations` is refused too — a migration history in a database the engine did not just write is either a real database or the remains of a run that crashed. The refusal names the database and not the way in: the diff-path test gives the shadow database a login of its own and asserts that neither the user nor the password reaches the message. With consent the same setup goes through and the shadow database is left empty. SQLite gets its own test for the shape it did not have before — a file holding a table the migration history also creates is refused, and consented to, reset, and replayed into cleanly. Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
Author
Committer
Parents
Loading