Add to test schemas

This commit is contained in:
Patrick O'brien 2016-09-17 14:39:52 +10:00
parent bbd9277e0e
commit 2ba5371cb6
2 changed files with 49 additions and 10 deletions

View file

@ -181,3 +181,23 @@ create table elephants (
foreign key (tiger_id) references tigers (id)
);
create table wolves (
id binary primary key,
name binary not null,
tiger_id binary not null unique,
foreign key (tiger_id) references tigers (id)
);
create table ants (
id binary primary key,
name binary not null,
tiger_id binary not null,
foreign key (tiger_id) references tigers (id)
);
create table worms (
id binary primary key,
name binary not null,
tiger_id binary null,
foreign key (tiger_id) references tigers (id)
);

View file

@ -214,16 +214,35 @@ create table fun_arrays (
primary key (id)
);
create table elephants (
id bytea,
name bytea not null,
tiger_id bytea null unique,
primary key (id),
foreign key (stuff_id) references tigers (id)
create table tigers (
id bytea primary key,
name bytea null
);
create table tigers (
id bytea,
name bytea null,
primary key (id)
create table elephants (
id bytea primary key,
name bytea not null,
tiger_id bytea null unique,
foreign key (tiger_id) references tigers (id)
);
create table wolves (
id bytea primary key,
name bytea not null,
tiger_id bytea not null unique,
foreign key (tiger_id) references tigers (id)
);
create table ants (
id bytea primary key,
name bytea not null,
tiger_id bytea not null,
foreign key (tiger_id) references tigers (id)
);
create table worms (
id bytea primary key,
name bytea not null,
tiger_id bytea null,
foreign key (tiger_id) references tigers (id)
);