github.com/readium/readium-lcp-server@v0.0.0-20240509124024-799e77a0bbd6/dbmodel/mysql_db_setup_lsdserver.sql (about) 1 CREATE TABLE `license_status` ( 2 `id` int(11) PRIMARY KEY AUTO_INCREMENT, 3 `status` int(11) NOT NULL, 4 `license_updated` datetime NOT NULL, 5 `status_updated` datetime NOT NULL, 6 `device_count` int(11) DEFAULT NULL, 7 `potential_rights_end` datetime DEFAULT NULL, 8 `license_ref` varchar(255) NOT NULL, 9 `rights_end` datetime DEFAULT NULL 10 ); 11 12 CREATE INDEX `license_ref_index` ON `license_status` (`license_ref`); 13 14 CREATE TABLE `event` ( 15 `id` int(11) PRIMARY KEY AUTO_INCREMENT, 16 `device_name` varchar(255) DEFAULT NULL, 17 `timestamp` datetime NOT NULL, 18 `type` int NOT NULL, 19 `device_id` varchar(255) DEFAULT NULL, 20 `license_status_fk` int NOT NULL, 21 FOREIGN KEY(`license_status_fk`) REFERENCES `license_status` (`id`) 22 ); 23 24 CREATE INDEX `license_status_fk_index` on `event` (`license_status_fk`);