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
-- Add a short abbreviation ("code") to locations, used as the [Site] segment of
-- configurable serial numbers (falls back to the location name when null).
-- Nullable; no view depends on SELECT * over "location" so no view recreate is needed.
ALTER TABLE "location" ADD COLUMN IF NOT EXISTS "code" TEXT;
-- Backfill the seeded default location. Idempotent: only fills a still-null code.
UPDATE "location"
SET "code" = 'HQ'
WHERE "name" = 'Headquarters' AND "code" IS NULL;