fix: remove --skip-generate flag from prisma db push (removed in Prisma 7)

Prisma 7 removed the --skip-generate flag from 'prisma db push'. This caused
the testcontainers migration command to fail silently (tinyexec swallows the
error), resulting in empty databases and 'table does not exist' errors in tests.

Also added --url flag to pass the connection string directly to the CLI,
ensuring the correct URL is used regardless of config file resolution.

Co-Authored-By: Eric Allam <eallam@icloud.com>
This commit is contained in:
Devin AI
2026-04-15 17:56:00 +00:00
parent 43d23a7ae6
commit 937ac2c514
@@ -29,9 +29,10 @@ export async function createPostgresContainer(network: StartedNetwork) {
"push",
"--force-reset",
"--accept-data-loss",
"--skip-generate",
"--schema",
`${databasePath}/prisma/schema.prisma`,
"--url",
container.getConnectionUri(),
],
{
nodeOptions: {