Video conf based on SimpleWebRTC https://vroom.fws.fr/documentation
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
2.5 KiB

CREATE TABLE `config` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`key` VARCHAR(40) NOT NULL,
`value` VARCHAR(40) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE (`key`)
) ENGINE INNODB DEFAULT CHARSET=utf8;
INSERT INTO `config` (`key`,`value`)
VALUES ('schema_version', '6');
CREATE TABLE `rooms` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(120) NOT NULL,
`create_date` DATETIME DEFAULT NULL,
`last_activity` DATETIME DEFAULT NULL,
`locked` TINYINT UNSIGNED DEFAULT '0',
`ask_for_name` TINYINT UNSIGNED DEFAULT '0',
`join_password` VARCHAR(160) DEFAULT NULL,
`owner_password` VARCHAR(160) DEFAULT NULL,
`etherpad_group` VARCHAR(40) DEFAULT NULL,
`token` VARCHAR(160) NOT NULL,
`realm` VARCHAR(160) DEFAULT NULL,
`persistent` TINYINT UNSIGNED DEFAULT '0',
`max_members` TINYINT UNSIGNED DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE (`name`),
INDEX (`last_activity`)
) ENGINE INNODB DEFAULT CHARSET=utf8;
CREATE TABLE `email_notifications` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`room_id` INT UNSIGNED NOT NULL,
`email` VARCHAR(254),
PRIMARY KEY (`id`),
UNIQUE (`room_id`, `email`),
FOREIGN KEY (`room_id`) REFERENCES `rooms` (`id`)
ON UPDATE CASCADE
ON DELETE CASCADE
) ENGINE INNODB DEFAULT CHARSET=utf8;
CREATE TABLE `email_invitations` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`room_id` INT UNSIGNED NOT NULL,
`email` VARCHAR(254) NOT NULL,
`token` VARCHAR(160) NOT NULL,
`from` VARCHAR(60) NOT NULL,
`response` VARCHAR(20) DEFAULT NULL,
`message` TEXT DEFAULT NULL,
`processed` TINYINT DEFAULT '0',
`date` DATETIME DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE (`token`),
FOREIGN KEY (`room_id`) REFERENCES `rooms` (`id`)
ON UPDATE CASCADE
ON DELETE CASCADE
) ENGINE INNODB DEFAULT CHARSET=utf8;
CREATE TABLE `api_keys` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`token` VARCHAR(160) NOT NULL,
`admin` TINYINT UNSIGNED DEFAULT '0',
`not_after` DATETIME DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE (`token`),
INDEX (`not_after`)
) ENGINE INNODB DEFAULT CHARSET=utf8;
CREATE TABLE `room_keys` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`room_id` INT UNSIGNED NOT NULL,
`key_id` INT UNSIGNED NOT NULL,
`role` ENUM('owner', 'participant') DEFAULT 'participant',
PRIMARY KEY (`id`),
UNIQUE (`room_id`, `key_id`),
FOREIGN KEY (`room_id`) REFERENCES `rooms` (`id`)
ON UPDATE CASCADE
ON DELETE CASCADE,
FOREIGN KEY (`key_id`) REFERENCES `api_keys` (`id`)
ON UPDATE CASCADE
ON DELETE CASCADE
) ENGINE INNODB DEFAULT CHARSET=utf8;