1
0
mirror of https://github.com/linkedin/oncall.git synced 2025-12-02 23:58:38 +02:00

Add team subscriptions

This commit is contained in:
Daniel Wang
2017-11-03 10:57:51 -07:00
committed by Joe Gillotti
parent 7bb10a04d2
commit 2aee0c316c
12 changed files with 404 additions and 57 deletions

View File

@@ -417,6 +417,19 @@ CREATE TABLE IF NOT EXISTS `application` (
PRIMARY KEY (`id`)
);
CREATE TABLE IF NOT EXISTS `team_subscription` (
`team_id` BIGINT(20) UNSIGNED NOT NULL,
`subscription_id` BIGINT(20) UNSIGNED NOT NULL,
`role_id` INT UNSIGNED NOT NULL,
PRIMARY KEY (`team_id`, `subscription_id`, `role_id`),
INDEX `team_subscription_team_id_idx` (`team_id` ASC),
CONSTRAINT `team_subscription_team_id_fk` FOREIGN KEY (`team_id`) REFERENCES `team` (`id`)
ON DELETE CASCADE,
CONSTRAINT `team_subscription_subscription_id_fk` FOREIGN KEY (`subscription_id`) REFERENCES `team` (`id`)
ON DELETE CASCADE,
INDEX `team_subscription_team_id_fk_idx` (`team_id` ASC)
);
INSERT INTO `scheduler` ( `name`, `description`)
VALUES ('default',
'Default scheduling algorithm'),