diff options
author | Asbjørn Sloth Tønnesen <ast@fiberby.net> | 2019-09-06 13:43:35 +0000 |
---|---|---|
committer | Asbjørn Sloth Tønnesen <ast@fiberby.net> | 2019-09-06 13:56:47 +0000 |
commit | 6b7297545b71fda63aff0a74e680660e8c22222b (patch) | |
tree | 44fe479e65b52d7404a402fd7f9c2f1ad3a88e6f /schema.sql | |
parent | 55acfbfb3bb76454a462fc3ae72de251871e8c41 (diff) | |
download | peeringdb-simplesync-6b7297545b71fda63aff0a74e680660e8c22222b.tar.gz peeringdb-simplesync-6b7297545b71fda63aff0a74e680660e8c22222b.tar.xz peeringdb-simplesync-6b7297545b71fda63aff0a74e680660e8c22222b.zip |
initial commit
Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
Diffstat (limited to 'schema.sql')
-rw-r--r-- | schema.sql | 115 |
1 files changed, 115 insertions, 0 deletions
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) +); |