Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE `incoming_payment` (
- `incoming_payment_key` varchar(36) NOT NULL,
- `reference_id` varchar(255) NOT NULL,
- `amount_cents` bigint(21) DEFAULT NULL,
- `amount_currency_code` varchar(255) DEFAULT NULL,
- `ref_buyer_key` varchar(36) DEFAULT NULL,
- `ref_ach_key` varchar(36) DEFAULT NULL,
- `created_at` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
- `updated_at` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
- PRIMARY KEY (`incoming_payment_key`),
- UNIQUE KEY `incoming_payment_key` (`incoming_payment_key`),
- KEY `idx_reference_id` (`reference_id`),
- KEY `idx_ref_buyer_key` (`ref_buyer_key`),
- KEY `idx_ref_ach_key` (`ref_ach_key`),
- KEY `idx_created_at` (`created_at`),
- KEY `idx_updated_at` (`updated_at`),
- CONSTRAINT `fk_incoming_payment_ref_buyer_key` FOREIGN KEY (`ref_buyer_key`) REFERENCES `buyer` (`buyer_key`) ON DELETE CASCADE,
- CONSTRAINT `fk_incoming_payment_ref_ach_account_key` FOREIGN KEY (`ref_ach_key`) REFERENCES `ach` (`ach_key`) ON DELETE CASCADE
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement