diff --git a/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_condition.yaml b/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_condition.yaml index 313c126afa..fdb37c7dce 100644 --- a/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_condition.yaml +++ b/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_condition.yaml @@ -9,6 +9,17 @@ array_relationships: table: name: scheduling_specification_conditions schema: public +remote_relationships: +- name: model + definition: + to_source: + relationship_type: object + source: AerieMerlin + table: + schema: public + name: mission_model + field_mapping: + model_id: id select_permissions: - role: aerie_admin permission: diff --git a/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_goal.yaml b/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_goal.yaml index 4e425d7ab3..cf7720e5a0 100644 --- a/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_goal.yaml +++ b/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_goal.yaml @@ -26,6 +26,17 @@ array_relationships: insertion_order: null column_mapping: id: goal_id +remote_relationships: +- name: model + definition: + to_source: + relationship_type: object + source: AerieMerlin + table: + schema: public + name: mission_model + field_mapping: + model_id: id select_permissions: - role: aerie_admin permission: diff --git a/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_goal_analysis.yaml b/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_goal_analysis.yaml index d389ed442b..590ff89be1 100644 --- a/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_goal_analysis.yaml +++ b/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_goal_analysis.yaml @@ -11,6 +11,9 @@ object_relationships: insertion_order: null column_mapping: analysis_id: analysis_id +- name: goal + using: + foreign_key_constraint_on: goal_id array_relationships: - name: satisfying_activities using: diff --git a/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_goal_analysis_created_activities.yaml b/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_goal_analysis_created_activities.yaml index 784635e9b2..b947f998b3 100644 --- a/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_goal_analysis_created_activities.yaml +++ b/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_goal_analysis_created_activities.yaml @@ -1,6 +1,10 @@ table: name: scheduling_goal_analysis_created_activities schema: public +object_relationships: +- name: analysis + using: + foreign_key_constraint_on: analysis_id select_permissions: - role: aerie_admin permission: diff --git a/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_goal_analysis_satisfying_activities.yaml b/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_goal_analysis_satisfying_activities.yaml index d82de4ca83..2880149ef3 100644 --- a/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_goal_analysis_satisfying_activities.yaml +++ b/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_goal_analysis_satisfying_activities.yaml @@ -1,6 +1,10 @@ table: name: scheduling_goal_analysis_satisfying_activities schema: public +object_relationships: +- name: analysis + using: + foreign_key_constraint_on: analysis_id select_permissions: - role: aerie_admin permission: diff --git a/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_request.yaml b/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_request.yaml index 4ef0283cf2..d613f1c75d 100644 --- a/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_request.yaml +++ b/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_request.yaml @@ -1,6 +1,43 @@ table: name: scheduling_request schema: public +object_relationships: +- name: scheduling_specification + using: + foreign_key_constraint_on: specification_id +array_relationships: +- name: goal_analysis + using: + foreign_key_constraint_on: + column: analysis_id + table: + name: scheduling_goal_analysis + schema: public +- name: satisfying_activities + using: + foreign_key_constraint_on: + column: analysis_id + table: + name: scheduling_goal_analysis_satisfying_activities + schema: public +- name: created_activities + using: + foreign_key_constraint_on: + column: analysis_id + table: + name: scheduling_goal_analysis_created_activities + schema: public +remote_relationships: +- name: simulation_dataset + definition: + to_source: + relationship_type: object + source: AerieMerlin + table: + schema: public + name: simulation_dataset + field_mapping: + dataset_id: dataset_id select_permissions: - role: aerie_admin permission: diff --git a/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_specification.yaml b/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_specification.yaml index 8dd63f050c..5d52fc8fce 100644 --- a/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_specification.yaml +++ b/deployment/hasura/metadata/databases/AerieScheduler/tables/public_scheduling_specification.yaml @@ -1,6 +1,39 @@ table: name: scheduling_specification schema: public +array_relationships: +- name: goals + using: + foreign_key_constraint_on: + column: specification_id + table: + name: scheduling_specification_goals + schema: public +- name: conditions + using: + foreign_key_constraint_on: + column: specification_id + table: + name: scheduling_specification_conditions + schema: public +- name: requests + using: + foreign_key_constraint_on: + column: specification_id + table: + name: scheduling_request + schema: public +remote_relationships: +- name: plan + definition: + to_source: + relationship_type: object + source: AerieMerlin + table: + schema: public + name: plan + field_mapping: + plan_id: id select_permissions: - role: aerie_admin permission: