migration.sql 512 B

12345678910
  1. -- A design can volunteer itself for parts-only sales, the jobs made without
  2. -- a vehicle. Nullable, so every existing design
  3. -- keeps printing only where it was chosen. One design per rule per workshop
  4. -- and document; Postgres treats nulls as distinct, so designs without a rule
  5. -- do not collide.
  6. ALTER TABLE "document_designs" ADD COLUMN "autoRule" TEXT;
  7. CREATE UNIQUE INDEX "document_designs_organizationId_documentType_autoRule_key"
  8. ON "document_designs"("organizationId", "documentType", "autoRule");