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.

fix: add missing constraints migration (#2850)

Bogdan Chadkin8f02f08c213d
diff --git a/packages/prisma-client/prisma/migrations/20240131193159_new_constraints/migration.sql b/packages/prisma-client/prisma/migrations/20240131193159_new_constraints/migration.sql
new file mode 100644
index 0000000000..422fcf31bb
--- /dev/null
+++ b/packages/prisma-client/prisma/migrations/20240131193159_new_constraints/migration.sql
@@ -0,0 +1,5 @@
+-- DropForeignKey
+ALTER TABLE "Project" DROP CONSTRAINT "Project_previewImageAssetId_id_fkey";
+
+-- AddForeignKey
+ALTER TABLE "Project" ADD CONSTRAINT "Project_previewImageAssetId_id_fkey" FOREIGN KEY ("previewImageAssetId", "id") REFERENCES "Asset"("id", "projectId") ON DELETE RESTRICT ON UPDATE CASCADE;