mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 21:12:09 +03:00
06f5e4fb77
https://github.com/hasura/graphql-engine-mono/pull/1715 GitOrigin-RevId: 4818292cff8c3a5b264968e7032887a1e98b6f79
36 lines
941 B
YAML
36 lines
941 B
YAML
type: run_sql
|
|
args:
|
|
sql: |
|
|
CREATE table editors (
|
|
id serial primary key,
|
|
first_name text,
|
|
last_name text,
|
|
phone text,
|
|
age int,
|
|
updated_at timestamptz default now(),
|
|
created_at timestamptz default now()
|
|
);
|
|
|
|
CREATE TABLE authors (
|
|
id serial primary key,
|
|
first_name text,
|
|
last_name text,
|
|
phone text,
|
|
age int,
|
|
followers int default 0,
|
|
editor_id int references editors(id),
|
|
updated_at timestamptz default now(),
|
|
created_at timestamptz default now()
|
|
);
|
|
|
|
CREATE TABLE articles (
|
|
id serial primary key,
|
|
title text,
|
|
content text,
|
|
is_published boolean default false,
|
|
author_id int references authors(id),
|
|
editor_id int references editors(id),
|
|
updated_at timestamptz default now(),
|
|
created_at timestamptz default now()
|
|
);
|