graphql-engine/server/test/testcases/create_tables.yaml

28 lines
669 B
YAML

description: Runs a bulk SQL query to create tables
url: /v1/query
status: 200
query:
type: bulk
args:
- type: run_sql
args:
sql: "CREATE TABLE author (id SERIAL PRIMARY KEY, name TEXT)"
- type: run_sql
args:
sql: |
CREATE TABLE article (
id SERIAL PRIMARY KEY,
title TEXT,
content TEXT,
author_id INTEGER REFERENCES author(id),
is_published BOOLEAN,
published_on TIMESTAMP
)
- type: run_sql
args:
sql: |
CREATE TABLE person (
id SERIAL PRIMARY KEY,
details JSONB NOT NULL
)