Store gateway credentials per business, initiate/verify Mellat at checkout, and resolve old CMS ids from domains in the migrate modal. Co-authored-by: Cursor <cursoragent@cursor.com>
15 lines
528 B
SQL
15 lines
528 B
SQL
-- Meshkee CMS — e-payment gateway tracking on transactions
|
|
|
|
ALTER TABLE transactions
|
|
ADD COLUMN IF NOT EXISTS gateway_ref VARCHAR(255),
|
|
ADD COLUMN IF NOT EXISTS gateway_track_id VARCHAR(255),
|
|
ADD COLUMN IF NOT EXISTS gateway_meta JSONB;
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_transactions_gateway_ref
|
|
ON transactions (business_id, gateway_ref)
|
|
WHERE gateway_ref IS NOT NULL;
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_transactions_gateway_track
|
|
ON transactions (business_id, gateway_track_id)
|
|
WHERE gateway_track_id IS NOT NULL;
|