Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

589 B
Raw Blame
-- This fails when payout fraud_check rows with a NULL payment_id
-- still exist. Such rows must be deleted before rolling back this migration.
ALTER TABLE fraud_check
    ALTER COLUMN payment_id SET NOT NULL;

ALTER TABLE fraud_check
    DROP CONSTRAINT fraud_check_pkey;

ALTER TABLE fraud_check ADD PRIMARY KEY (frm_id, attempt_id, payment_id, merchant_id);

-- Restore the historical schema exactly, including its redundant unique index.
CREATE UNIQUE INDEX frm_id_index ON fraud_check (frm_id, attempt_id, payment_id, merchant_id);

ALTER TABLE fraud_check
    DROP COLUMN payout_id;