Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

build: fix running migrations on empty database (#2658)

Bogdan Chadkina31e68624879
diff --git a/packages/prisma-client/prisma/migrations/20231108172804_prop_expression/migration.ts b/packages/prisma-client/prisma/migrations/20231108172804_prop_expression/migration.ts
index 9d7c47e117..299c10c25b 100644
--- a/packages/prisma-client/prisma/migrations/20231108172804_prop_expression/migration.ts
+++ b/packages/prisma-client/prisma/migrations/20231108172804_prop_expression/migration.ts
@@ -191,6 +191,9 @@ export default async () => {
WHERE "Build"."id" = data."id"
`;
+ if (changedBuilds.length === 0) {
+ return;
+ }
const res = await prisma.$executeRawUnsafe(
sql,
changedBuilds.map((changedBuild) => changedBuild.id),