aboutsummaryrefslogtreecommitdiff
path: root/rpkid/rpki/sql_schemas.py
diff options
context:
space:
mode:
authorMichael Elkins <melkins@tislabs.com>2014-04-07 17:38:40 +0000
committerMichael Elkins <melkins@tislabs.com>2014-04-07 17:38:40 +0000
commit1a1c9b672049f1e6836bbccd96fe1734cc791456 (patch)
treea1e2c0b8336a7ffa267261fc184c64f666ec01ea /rpkid/rpki/sql_schemas.py
parentb403f46676c6dcde856f3a943361f08c2a6fe5f3 (diff)
parentaa28ef54c271fbe4d52860ff8cf13cab19e2207c (diff)
merge with ^/trunk
svn path=/branches/tk674/; revision=5761
Diffstat (limited to 'rpkid/rpki/sql_schemas.py')
-rw-r--r--rpkid/rpki/sql_schemas.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/rpkid/rpki/sql_schemas.py b/rpkid/rpki/sql_schemas.py
index e7c65299..e57c7a7f 100644
--- a/rpkid/rpki/sql_schemas.py
+++ b/rpkid/rpki/sql_schemas.py
@@ -2,7 +2,7 @@
## @var rpkid
## SQL schema rpkid
-rpkid = '''-- $Id: rpkid.sql 3745 2011-03-27 00:21:57Z sra $
+rpkid = '''-- $Id: rpkid.sql 5753 2014-04-05 19:24:26Z sra $
-- Copyright (C) 2009--2011 Internet Systems Consortium ("ISC")
--
@@ -37,6 +37,7 @@ rpkid = '''-- $Id: rpkid.sql 3745 2011-03-27 00:21:57Z sra $
-- DROP TABLE commands must be in correct (reverse dependency) order
-- to satisfy FOREIGN KEY constraints.
+DROP TABLE IF EXISTS ee_cert;
DROP TABLE IF EXISTS ghostbuster;
DROP TABLE IF EXISTS roa_prefix;
DROP TABLE IF EXISTS roa;
@@ -234,6 +235,20 @@ CREATE TABLE ghostbuster (
FOREIGN KEY (ca_detail_id) REFERENCES ca_detail (ca_detail_id) ON DELETE CASCADE
) ENGINE=InnoDB;
+CREATE TABLE ee_cert (
+ ee_cert_id SERIAL NOT NULL,
+ ski BINARY(20) NOT NULL,
+ cert LONGBLOB NOT NULL,
+ published DATETIME,
+ self_id BIGINT UNSIGNED NOT NULL,
+ ca_detail_id BIGINT UNSIGNED NOT NULL,
+ PRIMARY KEY (ee_cert_id),
+ CONSTRAINT ee_cert_self_id
+ FOREIGN KEY (self_id) REFERENCES self (self_id) ON DELETE CASCADE,
+ CONSTRAINT ee_cert_ca_detail_id
+ FOREIGN KEY (ca_detail_id) REFERENCES ca_detail (ca_detail_id) ON DELETE CASCADE
+) ENGINE=InnoDB;
+
-- Local Variables:
-- indent-tabs-mode: nil
-- End: