mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 12:31:52 +03:00
39002bc572
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2908 GitOrigin-RevId: d9d8811e0d0658f6396a7c94bce9b7d2deb5245e
111 lines
1.9 KiB
YAML
111 lines
1.9 KiB
YAML
type: bulk
|
|
args:
|
|
|
|
# track tables
|
|
- type: mssql_track_table
|
|
args:
|
|
source: mssql
|
|
table:
|
|
name: test_types
|
|
|
|
- type: mssql_track_table
|
|
args:
|
|
source: mssql
|
|
table:
|
|
name: author
|
|
|
|
- type: mssql_track_table
|
|
args:
|
|
source: mssql
|
|
table:
|
|
name: article
|
|
|
|
- type: mssql_track_table
|
|
args:
|
|
source: mssql
|
|
table:
|
|
name: user
|
|
|
|
- type: mssql_track_table
|
|
args:
|
|
source: mssql
|
|
table:
|
|
name: person
|
|
|
|
- type: mssql_track_table
|
|
args:
|
|
source: mssql
|
|
table:
|
|
name: article_multi
|
|
|
|
- type: mssql_track_table
|
|
args:
|
|
source: mssql
|
|
table:
|
|
name: author_multi
|
|
|
|
# create relationships
|
|
- type: mssql_create_object_relationship
|
|
args:
|
|
source: mssql
|
|
table: article
|
|
name: author
|
|
using:
|
|
foreign_key_constraint_on: author_id
|
|
|
|
- type: mssql_create_object_relationship
|
|
args:
|
|
source: mssql
|
|
table: article
|
|
name: co_author
|
|
using:
|
|
foreign_key_constraint_on: co_author_id
|
|
|
|
- type: mssql_create_array_relationship
|
|
args:
|
|
source: mssql
|
|
table: author
|
|
name: articles
|
|
using:
|
|
foreign_key_constraint_on:
|
|
table: article
|
|
column: author_id
|
|
|
|
|
|
- type: mssql_create_array_relationship
|
|
args:
|
|
source: mssql
|
|
table: author
|
|
name: co_articles
|
|
using:
|
|
foreign_key_constraint_on:
|
|
table: article
|
|
column: co_author_id
|
|
|
|
- type: mssql_create_object_relationship
|
|
args:
|
|
source: mssql
|
|
table: article_multi
|
|
name: author
|
|
using:
|
|
foreign_key_constraint_on: ["author_id1", "author_id2"]
|
|
|
|
- type: mssql_create_array_relationship
|
|
args:
|
|
source: mssql
|
|
table: author_multi
|
|
name: articles
|
|
using:
|
|
foreign_key_constraint_on:
|
|
table: article_multi
|
|
columns: ["author_id1", "author_id2"]
|
|
|
|
- type: mssql_create_select_permission
|
|
args:
|
|
source: mssql
|
|
table: author
|
|
role: user
|
|
permission:
|
|
columns: "*"
|
|
filter: {"id":{"_eq":"X-Hasura-User-Id"}}
|