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.

274 B
Raw Blame
CREATE OR REPLACE VIEW "userDefaults" AS
  SELECT
    u.id as "userId",
    l."companyId" as "companyId",
    ej."locationId"
  FROM "user" u 
  LEFT JOIN "employeeJob" ej ON ej.id = u.id
  LEFT JOIN "location" l ON l.id = ej."locationId" AND l."companyId" = ej."companyId";