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.

updated migration

Kartik Bajaj32b38b325fd2
diff --git a/packages/database/supabase/migrations/20251114222648_supplier_id.sql b/packages/database/supabase/migrations/20251114222648_supplier_id.sql
index 0539725bcf..9eb1434430 100644
--- a/packages/database/supabase/migrations/20251114222648_supplier_id.sql
+++ b/packages/database/supabase/migrations/20251114222648_supplier_id.sql
@@ -51,7 +51,7 @@ DECLARE
BEGIN
-- Insert into externalLink table and get the ID
INSERT INTO "externalLink" ("documentType", "documentId", "companyId")
- VALUES ('Non-Conformance', NEW."id", NEW."companyId")
+ VALUES ('Non-Conformance-Supplier', NEW."id", NEW."companyId")
ON CONFLICT ("documentId", "documentType", "companyId") DO UPDATE SET
"documentType" = EXCLUDED."documentType"
RETURNING "id" INTO external_link_id;