mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 13:02:11 +03:00
34 lines
601 B
YAML
34 lines
601 B
YAML
|
type: bulk
|
||
|
args:
|
||
|
|
||
|
#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
|
||
|
|