aboutsummaryrefslogtreecommitdiff
path: root/server/store/migrations/sqlite3
diff options
context:
space:
mode:
Diffstat (limited to 'server/store/migrations/sqlite3')
-rw-r--r--server/store/migrations/sqlite3/20180626224600_create_issued_certs.sql15
1 files changed, 15 insertions, 0 deletions
diff --git a/server/store/migrations/sqlite3/20180626224600_create_issued_certs.sql b/server/store/migrations/sqlite3/20180626224600_create_issued_certs.sql
new file mode 100644
index 0000000..c5b80e0
--- /dev/null
+++ b/server/store/migrations/sqlite3/20180626224600_create_issued_certs.sql
@@ -0,0 +1,15 @@
+-- +migrate Up
+CREATE TABLE IF NOT EXISTS `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`);
+
+-- +migrate Down
+DROP TABLE `issued_certs`;