RVRNEXT-43 add migration for transaction payees
This commit is contained in:
parent
6c821d41b4
commit
6c326b89e2
@ -0,0 +1,11 @@
|
|||||||
|
CREATE TABLE `transaction_payees` (
|
||||||
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`transaction_id` int(10) unsigned NOT NULL,
|
||||||
|
`user_id` int(10) unsigned DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
UNIQUE KEY `unique_user_for_transaction` (`transaction_id`, `user_id`),
|
||||||
|
KEY `transaction_id` (`transaction_id`),
|
||||||
|
KEY `user_id` (`user_id`),
|
||||||
|
CONSTRAINT `transaction_payees_transaction_id` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`id`),
|
||||||
|
CONSTRAINT `transaction_payees_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
|
||||||
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
Loading…
Reference in New Issue
Block a user