diff options
author | Rob Austein <sra@hactrn.net> | 2007-10-01 20:22:57 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-10-01 20:22:57 +0000 |
commit | 20f735ac7884111b47bd8ba974ed3e8fd1242e89 (patch) | |
tree | b957f1a784408c57bbb9466f8738b1cb621c9b6f /docs/sample-irdb.sql | |
parent | dc31da6d5e3c663e384a058142b920e092730268 (diff) |
Get rid of resource class silliness in left-right protocol.
svn path=/docs/left-right-xml; revision=1067
Diffstat (limited to 'docs/sample-irdb.sql')
-rw-r--r-- | docs/sample-irdb.sql | 55 |
1 files changed, 13 insertions, 42 deletions
diff --git a/docs/sample-irdb.sql b/docs/sample-irdb.sql index a039918a..abfba9e5 100644 --- a/docs/sample-irdb.sql +++ b/docs/sample-irdb.sql @@ -1,19 +1,24 @@ -- $Id$ +DROP TABLE IF EXISTS registrant; + +CREATE TABLE registrant ( + registrant_id SERIAL NOT NULL, + IRBE_mapped_id TEXT, + subject_name TEXT, + valid_until DATETIME NOT NULL, + PRIMARY KEY (registrant_id) +); + DROP TABLE IF EXISTS asn; CREATE TABLE asn ( asn_id SERIAL NOT NULL, start_as BIGINT unsigned NOT NULL, end_as BIGINT unsigned NOT NULL, - resource_class_id BIGINT unsigned NOT NULL, + registrant_id BIGINT unsigned NOT NULL, PRIMARY KEY (asn_id), - FOREIGN KEY (resource_class_id) REFERENCES resource_class ON DELETE SET NULL ON UPDATE SET NULL -); - -CREATE UNIQUE INDEX XPKasn ON asn -( - asn_id + FOREIGN KEY (registrant_id) REFERENCES registrant ON DELETE SET NULL ON UPDATE SET NULL ); DROP TABLE IF EXISTS net; @@ -23,41 +28,7 @@ CREATE TABLE net ( start_ip VARCHAR(40) NOT NULL, end_ip VARCHAR(40) NOT NULL, version TINYINT unsigned NOT NULL, - resource_class_id BIGINT unsigned NOT NULL, - PRIMARY KEY (net_id), - FOREIGN KEY (resource_class_id) REFERENCES resource_class ON DELETE SET NULL ON UPDATE SET NULL -); - -CREATE UNIQUE INDEX XPKnet ON net -( - net_id -); - -DROP TABLE IF EXISTS registrant; - -CREATE TABLE registrant ( - registrant_id SERIAL NOT NULL, - IRBE_mapped_id TEXT, - PRIMARY KEY (registrant_id) -); - -CREATE UNIQUE INDEX XPKregistrant ON registrant -( - registrant_id -); - -DROP TABLE IF EXISTS resource_class; - -CREATE TABLE resource_class ( - resource_class_id SERIAL NOT NULL, - subject_name TEXT, - valid_until DATETIME NOT NULL, registrant_id BIGINT unsigned NOT NULL, - PRIMARY KEY (resource_class_id), + PRIMARY KEY (net_id), FOREIGN KEY (registrant_id) REFERENCES registrant ON DELETE SET NULL ON UPDATE SET NULL ); - -CREATE UNIQUE INDEX XPKresource_class ON resource_class -( - resource_class_id -); |