Skip to main content

max / makenotwork

387 B · 5 lines History Blame Raw
1 -- Link child transactions (from bundle grants) to the parent bundle transaction.
2 -- Enables revoking child item access when a bundle purchase is refunded.
3 ALTER TABLE transactions ADD COLUMN parent_transaction_id UUID REFERENCES transactions(id) ON DELETE SET NULL;
4 CREATE INDEX idx_transactions_parent_id ON transactions(parent_transaction_id) WHERE parent_transaction_id IS NOT NULL;
5