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.

553 B
Raw Blame
-- Enum additions live alone: ADD VALUE cannot be used in the same transaction as the value.
ALTER TYPE "journalEntrySourceType" ADD VALUE IF NOT EXISTS 'Revenue Recognition';

DO $rvenums$
BEGIN
  IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'revenueScheduleType') THEN
    CREATE TYPE "revenueScheduleType" AS ENUM ('Deferral', 'Accrual', 'Interest');
  END IF;
  IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'revenueScheduleStatus') THEN
    CREATE TYPE "revenueScheduleStatus" AS ENUM ('Planned', 'Posted');
  END IF;
END $rvenums$;