graphql-engine/server/tests-py/queries/graphql_mutation/roles_inheritance/schema_setup.yaml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
941 B
YAML
Raw Normal View History

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()
);