mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 21:12:09 +03:00
31 lines
664 B
YAML
31 lines
664 B
YAML
type: bulk
|
|
args:
|
|
|
|
#Author table
|
|
- type: run_sql
|
|
args:
|
|
sql: |
|
|
create table author(
|
|
id serial primary key,
|
|
name text unique,
|
|
remarks text
|
|
);
|
|
create table article(
|
|
id serial primary key,
|
|
title text,
|
|
author_id integer references author(id)
|
|
);
|
|
CREATE TABLE hge_tests.resident (
|
|
id SERIAL PRIMARY KEY,
|
|
name TEXT NOT NULL,
|
|
age INTEGER NOT NULL
|
|
);
|
|
insert into author (name)
|
|
values
|
|
('Author 1'),
|
|
('Author 2');
|
|
insert into hge_tests.resident (name,age)
|
|
values
|
|
('Resident 1', 23),
|
|
('Resident 2', 31);
|