Skip to content

Commit

Permalink
feat(Depot User): Add table depot_permission
Browse files Browse the repository at this point in the history
  • Loading branch information
lomamech committed Oct 24, 2017
1 parent 3a81ce7 commit 5b9018b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions server/models/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1955,3 +1955,18 @@ CREATE TABLE `transaction_history` (
KEY `user_id` (`user_id`),
FOREIGN KEY (`user_id`) REFERENCES `user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `depot_permission`;

CREATE TABLE `depot_permission` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`user_id` smallint(5) unsigned NOT NULL,
`depot_uuid` BINARY(16) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `depot_permission_1` (`user_id`,`depot_uuid`),
KEY `user_id` (`user_id`),
KEY `depot_uuid` (`depot_uuid`),
FOREIGN KEY (`depot_uuid`) REFERENCES `depot` (`uuid`),
FOREIGN KEY (`user_id`) REFERENCES `user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

0 comments on commit 5b9018b

Please sign in to comment.