graphql-engine/server/tests-py/queries/graphql_mutation/insert/constraints/setup.yaml
nizar-m 596bccde49 add python based tests, remove haskell tests
this does not generate coverage report yet
2018-10-04 18:14:15 +05:30

47 lines
812 B
YAML

type: bulk
args:
#Author table
- type: run_sql
args:
sql: |
create table author(
id serial primary key,
name text unique
);
- type: track_table
args:
schema: public
name: author
#Create resident table
- type: run_sql
args:
sql: |
CREATE TABLE resident (
id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
age INTEGER NOT NULL
)
- type: track_table
args:
schema: public
name: resident
#Create address table
- type: run_sql
args:
sql: |
CREATE TABLE address (
id SERIAL PRIMARY KEY,
door_no TEXT NOT NULL,
street TEXT NOT NULL,
city TEXT NOT NULL,
resident_id INTEGER REFERENCES resident(id)
)
- type: track_table
args:
schema: public
name: address