graphql-engine/server/tests-py/queries/graphql_mutation/enums/schema_setup.yaml
Swann Moreau 5bc0355bdd [server] coalesce multiple run_sql calls in tests (#270)
GitOrigin-RevId: abd7303aaf8e7a8739fd10574249aec450082ef8
2021-01-06 16:07:22 +00:00

37 lines
791 B
YAML

type: bulk
args:
- type: run_sql
args:
sql: |
CREATE TABLE colors
( value text PRIMARY KEY
, comment text );
INSERT INTO colors (value, comment) VALUES
('red', '#FF0000'),
('green', '#00FF00'),
('blue', '#0000FF'),
('orange', '#FFFF00'),
('yellow', '#00FFFF'),
('purple', '#FF00FF');
CREATE TABLE users
( id serial PRIMARY KEY
, name text NOT NULL
, favorite_color text NOT NULL REFERENCES colors );
CREATE TABLE posts
( id serial PRIMARY KEY
, title text NOT NULL
, custom_color text REFERENCES colors );
- type: track_table
args:
table: colors
is_enum: true
- type: track_table
args: users
- type: track_table
args: posts