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.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
fix: drop materials view before redefining it
Brad Barbin3ed79fa3baf5
diff --git a/packages/database/supabase/migrations/20251122152701_materials-view-fix.sql b/packages/database/supabase/migrations/20251122152701_materials-view-fix.sqlindex 14072d49fa..9125fedc69 100644--- a/packages/database/supabase/migrations/20251122152701_materials-view-fix.sql+++ b/packages/database/supabase/migrations/20251122152701_materials-view-fix.sql@@ -1,3 +1,4 @@+DROP VIEW IF EXISTS "materials";CREATE OR REPLACE VIEW "materials" WITH (SECURITY_INVOKER=true) ASWITH latest_items AS (SELECT DISTINCT ON (i."readableId", i."companyId")