1
0
mirror of https://github.com/linkedin/oncall.git synced 2025-11-30 23:44:59 +02:00

CRUD operations for ical_key (#299)

* CRUD operations for ical_key

All HTTP endpoints around ical_key should be authenticated so that we
can easily track what keys are created by this logged-in user.

* add missing semicolon

* store unix_timestamp as BIGINT
This commit is contained in:
Colin Yang
2020-03-06 13:55:45 -08:00
committed by GitHub
parent 5b9520837f
commit 651ca21fd2
5 changed files with 233 additions and 0 deletions

View File

@@ -434,6 +434,19 @@ CREATE TABLE IF NOT EXISTS `application` (
PRIMARY KEY (`id`)
);
-- -----------------------------------------------------
-- Table `ical_key`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `ical_key` (
`key` CHAR(36) CHARACTER SET ascii NOT NULL,
`requester` CHAR(255) NOT NULL,
`name` CHAR(255) NOT NULL,
`type` ENUM('team', 'user') NOT NULL,
`time_created` BIGINT(20) NOT NULL,
PRIMARY KEY (`requester`, `name`, `type`),
INDEX `key_idx` (`KEY`)
);
CREATE TABLE IF NOT EXISTS `team_subscription` (
`team_id` BIGINT(20) UNSIGNED NOT NULL,
`subscription_id` BIGINT(20) UNSIGNED NOT NULL,