From 937ac2c5141a84352f2d43344223ca97bc67a544 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 15 Apr 2026 17:56:00 +0000 Subject: [PATCH] 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 --- internal-packages/testcontainers/src/utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal-packages/testcontainers/src/utils.ts b/internal-packages/testcontainers/src/utils.ts index ea344e63f..0b4f13b70 100644 --- a/internal-packages/testcontainers/src/utils.ts +++ b/internal-packages/testcontainers/src/utils.ts @@ -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: {