graphql-engine/server/tests-py/queries/graphql_introspection/nullable_object_relationship/setup.yaml
Anon Ray d16bc4fe46 server: fix handling of nullable object relationships
GitOrigin-RevId: 3214e77ed06a07b6c1293d59daa088649a881e78
2021-03-10 08:56:03 +00:00

31 lines
529 B
YAML

type: bulk
args:
- type: run_sql
args:
sql: |
CREATE TABLE table1 (
id serial primary key,
name text
);
CREATE TABLE table2 (
id serial primary key,
name text,
table1_id INTEGER REFERENCES table1(id)
);
- type: track_table
version: 2
args:
table: table1
- type: track_table
version: 2
args:
table: table2
- type: create_object_relationship
args:
name: via_table1
table: table2
using:
foreign_key_constraint_on: table1_id