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: don't allow the procedure content to be null

Brad Barbin55b765ce0a01
diff --git a/packages/database/supabase/migrations/20250919144735_non-null-procedure.sql b/packages/database/supabase/migrations/20250919144735_non-null-procedure.sql
new file mode 100644
index 0000000000..39c007d68f
--- /dev/null
+++ b/packages/database/supabase/migrations/20250919144735_non-null-procedure.sql
@@ -0,0 +1,3 @@
+ALTER TABLE procedure ALTER COLUMN content SET DEFAULT '{}'::json;
+UPDATE procedure SET content = '{}'::json WHERE content IS NULL;
+ALTER TABLE procedure ALTER COLUMN content SET NOT NULL;