2019-09-30 22:50:57 +03:00
|
|
|
type: bulk
|
|
|
|
args:
|
2021-01-06 19:06:24 +03:00
|
|
|
|
2020-11-03 11:15:22 +03:00
|
|
|
- type: run_sql
|
|
|
|
args:
|
|
|
|
sql: |
|
2021-01-06 19:06:24 +03:00
|
|
|
CREATE TABLE test(id serial PRIMARY KEY);
|
2020-11-03 11:15:22 +03:00
|
|
|
create table articles(
|
|
|
|
id serial primary key,
|
|
|
|
user_id int,
|
|
|
|
content text,
|
|
|
|
title text,
|
|
|
|
is_public bool default false
|
|
|
|
);
|
2021-01-06 19:06:24 +03:00
|
|
|
|
|
|
|
- type: track_table
|
|
|
|
args:
|
|
|
|
name: test
|
2020-11-03 11:15:22 +03:00
|
|
|
- type: track_table
|
|
|
|
args:
|
|
|
|
name: articles
|
|
|
|
- type: create_select_permission
|
|
|
|
args:
|
|
|
|
table:
|
|
|
|
name: articles
|
|
|
|
role: public
|
|
|
|
permission:
|
|
|
|
columns:
|
|
|
|
- title
|
|
|
|
- content
|
|
|
|
filter:
|
|
|
|
is_public: true
|
|
|
|
- type: create_select_permission
|
|
|
|
args:
|
|
|
|
table:
|
|
|
|
name: articles
|
|
|
|
role: user
|
|
|
|
permission:
|
|
|
|
columns:
|
|
|
|
- user_id
|
|
|
|
- title
|
|
|
|
- content
|
|
|
|
- is_public
|
|
|
|
filter:
|
|
|
|
id:
|
|
|
|
_eq: X-Hasura-User-Id
|