diff options
author | Asbjørn Sloth Tønnesen <ast@a5n.dk> | 2024-11-07 21:50:31 +0000 |
---|---|---|
committer | Asbjørn Sloth Tønnesen <ast@a5n.dk> | 2024-11-07 21:50:31 +0000 |
commit | fef29917c688da707f3a49871efda72010042155 (patch) | |
tree | be07723b3ff26273a648e17385f919f0fad2013b | |
parent | 9d0ecfa813820991523daa3bb481ddbd8f1e3ae9 (diff) | |
download | peeringdb-simplesync-fef29917c688da707f3a49871efda72010042155.tar.gz peeringdb-simplesync-fef29917c688da707f3a49871efda72010042155.tar.xz peeringdb-simplesync-fef29917c688da707f3a49871efda72010042155.zip |
schema: add if not exists
Signed-off-by: Asbjørn Sloth Tønnesen <ast@a5n.dk>
-rw-r--r-- | schema.sql | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -1,6 +1,6 @@ -create schema peeringdb; +CREATE SCHEMA IF NOT EXISTS peeringdb; -create table peeringdb.org ( +CREATE TABLE IF NOT EXISTS peeringdb.org ( id int not null, status text not null, data jsonb not null, @@ -10,7 +10,7 @@ create table peeringdb.org ( primary key (id) ); -create table peeringdb.net ( +CREATE TABLE IF NOT EXISTS peeringdb.net ( id int not null, org_id int not null, asn bigint not null, @@ -22,7 +22,7 @@ create table peeringdb.net ( primary key (id) ); -create table peeringdb.ix ( +CREATE TABLE IF NOT EXISTS peeringdb.ix ( id int not null, org_id int not null, status text not null, @@ -33,7 +33,7 @@ create table peeringdb.ix ( primary key (id) ); -create table peeringdb.fac ( +CREATE TABLE IF NOT EXISTS peeringdb.fac ( id int not null, org_id int not null, status text not null, @@ -44,7 +44,7 @@ create table peeringdb.fac ( primary key (id) ); -create table peeringdb.poc ( +CREATE TABLE IF NOT EXISTS peeringdb.poc ( id int not null, net_id int not null, status text not null, @@ -55,7 +55,7 @@ create table peeringdb.poc ( primary key (id) ); -create table peeringdb.ixlan ( +CREATE TABLE IF NOT EXISTS peeringdb.ixlan ( id int not null, ix_id int not null, status text not null, @@ -66,7 +66,7 @@ create table peeringdb.ixlan ( primary key (id) ); -create table peeringdb.ixpfx ( +CREATE TABLE IF NOT EXISTS peeringdb.ixpfx ( id int not null, ixlan_id int not null, status text not null, @@ -77,7 +77,7 @@ create table peeringdb.ixpfx ( primary key (id) ); -create table peeringdb.ixfac ( +CREATE TABLE IF NOT EXISTS peeringdb.ixfac ( id int not null, ix_id int not null, fac_id int not null, @@ -89,7 +89,7 @@ create table peeringdb.ixfac ( primary key (id) ); -create table peeringdb.netfac ( +CREATE TABLE IF NOT EXISTS peeringdb.netfac ( id int not null, net_id int not null, fac_id int not null, @@ -101,7 +101,7 @@ create table peeringdb.netfac ( primary key (id) ); -create table peeringdb.netixlan ( +CREATE TABLE IF NOT EXISTS peeringdb.netixlan ( id int not null, net_id int not null, ix_id int not null, |