summaryrefslogtreecommitdiff
path: root/sql/fixes/recurring_pkey_duplicate.sql
blob: 23e11ea612d637c6b2fa21b6c42800dcde456516 (plain)
  1. -- SC: Corrects the primary key constraints on the recurringemail and print
  2. -- tables. The original primary keys are too restrictive and go against
  3. -- how the application works in that they don't allow for printing or
  4. -- emailing multiple forms as part of a recurring transaction.
  5. --
  6. -- Related adjustments also are made to the status table.
  7. ALTER TABLE recurringemail DROP CONSTRAINT recurringemail_pkey;
  8. ALTER TABLE recurringemail ADD PRIMARY KEY (id, formname);
  9. ALTER TABLE recurringprint DROP CONSTRAINT recurringprint_pkey;
  10. ALTER TABLE recurringprint ADD PRIMARY KEY (id, formname);
  11. ALTER TABLE status DROP CONSTRAINT status_pkey;
  12. ALTER TABLE status ADD PRIMARY KEY (trans_id, formname);