aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2007-09-25 19:21:24 +0000
committerRob Austein <sra@hactrn.net>2007-09-25 19:21:24 +0000
commit6e1578d6bba4920f23bf97839bdfe3a3f7e1e3a2 (patch)
tree133998bc807aca9a2927801bfa76aba17d235452 /docs
parent18067187c3a020803a2a4cec2a37349914758140 (diff)
Get rid of child_ca_link table, as I have no current use for it and
maintaining it was a pain. Add state column to ca_detail table. Rename child_ca_certificate table to child_cert and make it a first class table with an independent primary key; former key semantics were wrong (didn't handle child key rollover) and harder to implement. svn path=/docs/Makefile; revision=1027
Diffstat (limited to 'docs')
-rw-r--r--docs/Makefile3
-rw-r--r--docs/rpki-db-schema.pdfbin5498 -> 5329 bytes
-rw-r--r--docs/rpki-db-schema.sql44
3 files changed, 18 insertions, 29 deletions
diff --git a/docs/Makefile b/docs/Makefile
index 7a784475..ce3561ef 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -1,8 +1,5 @@
# $Id$
-all::
- xmllint --noout left-right-xml
-
all:: rpki-db-schema.pdf
rpki-db-schema.pdf: rpki-db-schema.sql
diff --git a/docs/rpki-db-schema.pdf b/docs/rpki-db-schema.pdf
index 077ad3d5..ffdafa27 100644
--- a/docs/rpki-db-schema.pdf
+++ b/docs/rpki-db-schema.pdf
Binary files differ
diff --git a/docs/rpki-db-schema.sql b/docs/rpki-db-schema.sql
index 76da26dd..aef7608c 100644
--- a/docs/rpki-db-schema.sql
+++ b/docs/rpki-db-schema.sql
@@ -86,18 +86,19 @@ CREATE TABLE ca (
DROP TABLE IF EXISTS ca_detail;
CREATE TABLE ca_detail (
- ca_detail_id SERIAL NOT NULL,
- public_key LONGBLOB,
- private_key_handle LONGBLOB,
- latest_crl LONGBLOB,
- latest_ca_cert_over_public_key LONGBLOB,
- manifest_ee_private_key_handle LONGBLOB,
- manifest_ee_public_key LONGBLOB,
- latest_manifest_ee_cert LONGBLOB,
- latest_manifest LONGBLOB,
- ca_id BIGINT unsigned NOT NULL,
- PRIMARY KEY (ca_detail_id),
- FOREIGN KEY (ca_id) REFERENCES ca
+ ca_detail_id SERIAL NOT NULL,
+ public_key LONGBLOB,
+ private_key_handle LONGBLOB,
+ latest_crl LONGBLOB,
+ latest_ca_cert_over_public_key LONGBLOB,
+ manifest_ee_private_key_handle LONGBLOB,
+ manifest_ee_public_key LONGBLOB,
+ latest_manifest_ee_cert LONGBLOB,
+ latest_manifest LONGBLOB,
+ state ENUM ('active', 'deprecated', 'pending') NOT NULL,
+ ca_id BIGINT unsigned NOT NULL,
+ PRIMARY KEY (ca_detail_id),
+ FOREIGN KEY (ca_id) REFERENCES ca
);
DROP TABLE IF EXISTS child;
@@ -112,27 +113,18 @@ CREATE TABLE child (
FOREIGN KEY (self_id) REFERENCES self
);
-DROP TABLE IF EXISTS child_ca_certificate;
+DROP TABLE IF EXISTS child_cert;
-CREATE TABLE child_ca_certificate (
+CREATE TABLE child_cert (
+ child_cert_id SERIAL NOT NULL,
+ cert LONGBLOB NOT NULL,
child_id BIGINT unsigned NOT NULL,
ca_detail_id BIGINT unsigned NOT NULL,
- cert LONGBLOB NOT NULL,
- PRIMARY KEY (child_id, ca_detail_id),
+ PRIMARY KEY (child_cert_id),
FOREIGN KEY (ca_detail_id) REFERENCES ca_detail,
FOREIGN KEY (child_id) REFERENCES child
);
-DROP TABLE IF EXISTS child_ca_link;
-
-CREATE TABLE child_ca_link (
- ca_id BIGINT unsigned NOT NULL,
- child_id BIGINT unsigned NOT NULL,
- PRIMARY KEY (ca_id, child_id),
- FOREIGN KEY (child_id) REFERENCES child,
- FOREIGN KEY (ca_id) REFERENCES ca
-);
-
DROP TABLE IF EXISTS route_origin;
CREATE TABLE route_origin (