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
-- The change log must not hold a foreign key to "company". Deleting a company
-- cascades to its items and customers, whose log_table_changes trigger then
-- inserts a "tableChange" row for a company that is already gone in that
-- transaction: the insert fails the key and aborts the delete.
-- Rows of a deleted company are removed by the hourly retention purge.
ALTER TABLE "tableChange" DROP CONSTRAINT IF EXISTS "tableChange_companyId_fkey";