From 6b7297545b71fda63aff0a74e680660e8c22222b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= Date: Fri, 6 Sep 2019 13:43:35 +0000 Subject: initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Asbjørn Sloth Tønnesen --- schema.sql | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 schema.sql (limited to 'schema.sql') diff --git a/schema.sql b/schema.sql new file mode 100644 index 0000000..593f4c2 --- /dev/null +++ b/schema.sql @@ -0,0 +1,115 @@ +create schema peeringdb; + +create table peeringdb.org ( + id int not null, + status text not null, + data jsonb not null, + created timestamptz not null, + updated timestamptz not null, + deleted timestamptz, + primary key (id) +); + +create table peeringdb.net ( + id int not null, + org_id int not null, + asn int not null, + status text not null, + data jsonb not null, + created timestamptz not null, + updated timestamptz not null, + deleted timestamptz, + primary key (id) +); + +create table peeringdb.ix ( + id int not null, + org_id int not null, + status text not null, + data jsonb not null, + created timestamptz not null, + updated timestamptz not null, + deleted timestamptz, + primary key (id) +); + +create table peeringdb.fac ( + id int not null, + org_id int not null, + status text not null, + data jsonb not null, + created timestamptz not null, + updated timestamptz not null, + deleted timestamptz, + primary key (id) +); + +create table peeringdb.poc ( + id int not null, + net_id int not null, + status text not null, + data jsonb not null, + created timestamptz not null, + updated timestamptz not null, + deleted timestamptz, + primary key (id) +); + +create table peeringdb.ixlan ( + id int not null, + ix_id int not null, + status text not null, + data jsonb not null, + created timestamptz not null, + updated timestamptz not null, + deleted timestamptz, + primary key (id) +); + +create table peeringdb.ixpfx ( + id int not null, + ixlan_id int not null, + status text not null, + data jsonb not null, + created timestamptz not null, + updated timestamptz not null, + deleted timestamptz, + primary key (id) +); + +create table peeringdb.ixfac ( + id int not null, + ix_id int not null, + fac_id int not null, + status text not null, + data jsonb not null, + created timestamptz not null, + updated timestamptz not null, + deleted timestamptz, + primary key (id) +); + +create table peeringdb.netfac ( + id int not null, + net_id int not null, + fac_id int not null, + status text not null, + data jsonb not null, + created timestamptz not null, + updated timestamptz not null, + deleted timestamptz, + primary key (id) +); + +create table peeringdb.netixlan ( + id int not null, + net_id int not null, + ix_id int not null, + ixlan_id int not null, + status text not null, + data jsonb not null, + created timestamptz not null, + updated timestamptz not null, + deleted timestamptz, + primary key (id) +); -- cgit v1.2.1