mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
28 lines
669 B
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
|
|
)
|