blob: 03f7b1e3a2f8e0a61d6ef26aee34300c203d3d50 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
CREATE DATABASE IF NOT EXISTS `certs`;
USE `certs`;
CREATE TABLE `issued_certs` (
`key_id` varchar(255) NOT NULL,
`principals` varchar(255) DEFAULT "[]",
`created_at` datetime DEFAULT '1970-01-01 00:00:01',
`expires_at` datetime DEFAULT '1970-01-01 00:00:01',
`revoked` tinyint(1) DEFAULT 0,
`raw_key` text,
PRIMARY KEY (`key_id`)
);
CREATE INDEX `idx_expires_at` ON `issued_certs` (`expires_at`);
CREATE INDEX `idx_revoked_expires_at` ON `issued_certs` (`revoked`, `expires_at`);
|