Add mysql test database
- Fix spacing in postgres test database
This commit is contained in:
parent
1375634f71
commit
02eea7da44
2 changed files with 79 additions and 10 deletions
68
testdata/mysql_test_schema.sql
vendored
68
testdata/mysql_test_schema.sql
vendored
|
@ -201,3 +201,71 @@ create table worms (
|
|||
tiger_id binary null,
|
||||
foreign key (tiger_id) references tigers (id)
|
||||
);
|
||||
|
||||
create table pilots (
|
||||
id int primary key not null auto_increment,
|
||||
name varchar(255)
|
||||
);
|
||||
|
||||
create table airports (
|
||||
id int primary key not null auto_increment,
|
||||
name varchar(255)
|
||||
);
|
||||
|
||||
create table languages (
|
||||
id int primary key not null auto_increment,
|
||||
name varchar(255)
|
||||
);
|
||||
|
||||
create table jets (
|
||||
id int primary key not null auto_increment,
|
||||
name varchar(255),
|
||||
pilot_id integer,
|
||||
airport_id integer,
|
||||
|
||||
foreign key (pilot_id) references pilots (id),
|
||||
foreign key (airport_id) references airports (id)
|
||||
);
|
||||
|
||||
create table pilot_languages (
|
||||
pilot_id integer not null,
|
||||
language_id integer not null,
|
||||
|
||||
primary key (pilot_id, language_id),
|
||||
foreign key (pilot_id) references pilots (id),
|
||||
foreign key (language_id) references languages (id)
|
||||
);
|
||||
|
||||
create table byte_pilots (
|
||||
id binary primary key not null,
|
||||
name varchar(255)
|
||||
);
|
||||
|
||||
create table byte_airports (
|
||||
id binary primary key not null,
|
||||
name varchar(255)
|
||||
);
|
||||
|
||||
create table byte_languages (
|
||||
id binary primary key not null,
|
||||
name varchar(255)
|
||||
);
|
||||
|
||||
create table byte_jets (
|
||||
id binary primary key not null,
|
||||
name varchar(255),
|
||||
byte_pilot_id binary unique,
|
||||
byte_airport_id binary,
|
||||
|
||||
foreign key (byte_pilot_id) references byte_pilots (id),
|
||||
foreign key (byte_airport_id) references byte_airports (id)
|
||||
);
|
||||
|
||||
create table byte_pilot_languages (
|
||||
byte_pilot_id binary not null,
|
||||
byte_language_id binary not null,
|
||||
|
||||
primary key (byte_pilot_id, byte_language_id),
|
||||
foreign key (byte_pilot_id) references byte_pilots (id),
|
||||
foreign key (byte_language_id) references byte_languages (id)
|
||||
);
|
||||
|
|
1
testdata/postgres_test_schema.sql
vendored
1
testdata/postgres_test_schema.sql
vendored
|
@ -300,6 +300,7 @@ create table byte_jets (
|
|||
name character varying,
|
||||
byte_pilot_id bytea unique,
|
||||
byte_airport_id bytea,
|
||||
|
||||
foreign key (byte_pilot_id) references byte_pilots (id),
|
||||
foreign key (byte_airport_id) references byte_airports (id)
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue