Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

fix: drop table constraint from table view

Brad Barbin54dfa91f7278
diff --git a/packages/database/supabase/migrations/20250206200411_drop-custom-field-constraint.sql b/packages/database/supabase/migrations/20250206200411_drop-custom-field-constraint.sql
index c536d750f5..38fd45edae 100644
--- a/packages/database/supabase/migrations/20250206200411_drop-custom-field-constraint.sql
+++ b/packages/database/supabase/migrations/20250206200411_drop-custom-field-constraint.sql
@@ -1,4 +1,4 @@
-ALTER TABLE "tableView" DROP CONSTRAINT "tableView_table_fkey";
+ALTER TABLE "tableView" DROP CONSTRAINT IF EXISTS "tableView_table_fkey";
INSERT INTO "customFieldTable" ("table", "name", "module")
VALUES