2021-07-15 15:44:26 +03:00
|
|
|
type: bulk
|
2021-07-21 13:22:03 +03:00
|
|
|
args:
|
2021-07-15 15:44:26 +03:00
|
|
|
|
2021-07-21 13:22:03 +03:00
|
|
|
# track tables
|
|
|
|
|
|
|
|
- type: mysql_track_table
|
|
|
|
args:
|
|
|
|
source: mysql
|
|
|
|
table:
|
|
|
|
name: author
|
|
|
|
schema: hasura
|
|
|
|
|
|
|
|
- type: mysql_track_table
|
|
|
|
args:
|
|
|
|
source: mysql
|
|
|
|
table:
|
|
|
|
name: article
|
|
|
|
schema: hasura
|
|
|
|
|
|
|
|
# create relationships
|
|
|
|
|
|
|
|
- type: mysql_create_object_relationship
|
|
|
|
args:
|
|
|
|
source: mysql
|
|
|
|
table:
|
|
|
|
name: article
|
|
|
|
schema: hasura
|
|
|
|
name: author
|
|
|
|
using:
|
|
|
|
foreign_key_constraint_on: author_id
|
|
|
|
|
|
|
|
- type: mysql_create_object_relationship
|
|
|
|
args:
|
|
|
|
source: mysql
|
|
|
|
table:
|
|
|
|
name: article
|
|
|
|
schema: hasura
|
|
|
|
name: co_author
|
|
|
|
using:
|
|
|
|
foreign_key_constraint_on: co_author_id
|
|
|
|
|
|
|
|
- type: mysql_create_array_relationship
|
|
|
|
args:
|
|
|
|
source: mysql
|
|
|
|
table:
|
|
|
|
name: author
|
|
|
|
schema: hasura
|
|
|
|
name: articles
|
|
|
|
using:
|
|
|
|
foreign_key_constraint_on:
|
|
|
|
table:
|
|
|
|
name: article
|
|
|
|
schema: hasura
|
|
|
|
column: author_id
|
|
|
|
|
|
|
|
- type: mysql_create_array_relationship
|
|
|
|
args:
|
|
|
|
source: mysql
|
|
|
|
table:
|
|
|
|
name: author
|
|
|
|
schema: hasura
|
|
|
|
name: co_articles
|
|
|
|
using:
|
|
|
|
foreign_key_constraint_on:
|
|
|
|
table:
|
|
|
|
name: article
|
|
|
|
schema: hasura
|
|
|
|
column: co_author_id
|