Skip to content

Commit

Permalink
Merge pull request #1245 from cityofaustin/2.3.0-release-candidate
Browse files Browse the repository at this point in the history
2.3.0 Amistad Reservoir
  • Loading branch information
johnclary authored Jan 18, 2024
2 parents 8880e16 + 1ff42b3 commit 0300c10
Show file tree
Hide file tree
Showing 48 changed files with 10,886 additions and 27,978 deletions.
1 change: 1 addition & 0 deletions moped-database/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
atd_moped-full.sql.gz
*moped_dump.sql
production.sql
reload.sh
2 changes: 1 addition & 1 deletion moped-database/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
version: '3.7'
services:
hasura:
image: hasura/graphql-engine:v2.35.1
image: hasura/graphql-engine:v2.36.1
restart: always
depends_on:
- moped-pgsql
Expand Down
70 changes: 40 additions & 30 deletions moped-database/metadata/tables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2390,10 +2390,11 @@
- role: moped-admin
permission:
check: {}
set:
created_by_user_id: x-hasura-user-db-id
updated_by_user_id: x-hasura-user-db-id
columns:
- project_id
- date_added
- added_by
- funding_source_id
- funding_program_id
- funding_amount
Expand All @@ -2402,11 +2403,14 @@
- fund
- dept_unit
- is_deleted
comment: No insert permissions on audit fields
- role: moped-editor
permission:
check: {}
set:
created_by_user_id: x-hasura-user-db-id
updated_by_user_id: x-hasura-user-db-id
columns:
- added_by
- funding_amount
- funding_program_id
- funding_source_id
Expand All @@ -2415,13 +2419,13 @@
- dept_unit
- fund
- funding_description
- date_added
- is_deleted
comment: No insert permissions on audit fields
select_permissions:
- role: moped-admin
permission:
columns:
- added_by
- created_by_user_id
- funding_amount
- funding_program_id
- funding_source_id
Expand All @@ -2431,14 +2435,16 @@
- dept_unit
- fund
- funding_description
- date_added
- created_at
- is_deleted
- updated_at
- updated_by_user_id
filter: {}
allow_aggregations: true
- role: moped-editor
permission:
columns:
- added_by
- created_by_user_id
- funding_amount
- funding_program_id
- funding_source_id
Expand All @@ -2448,14 +2454,16 @@
- dept_unit
- fund
- funding_description
- date_added
- created_at
- is_deleted
- updated_at
- updated_by_user_id
filter: {}
allow_aggregations: true
- role: moped-viewer
permission:
columns:
- added_by
- created_by_user_id
- funding_amount
- funding_program_id
- funding_source_id
Expand All @@ -2465,15 +2473,18 @@
- dept_unit
- fund
- funding_description
- date_added
- created_at
- is_deleted
- updated_at
- updated_by_user_id
filter: {}
allow_aggregations: true
update_permissions:
- role: moped-admin
permission:
set:
updated_by_user_id: x-hasura-user-db-id
columns:
- added_by
- funding_amount
- funding_program_id
- funding_source_id
Expand All @@ -2482,14 +2493,15 @@
- dept_unit
- fund
- funding_description
- date_added
- is_deleted
filter: {}
check: null
comment: No update permissions on audit fields
- role: moped-editor
permission:
set:
updated_by_user_id: x-hasura-user-db-id
columns:
- added_by
- funding_amount
- funding_program_id
- funding_source_id
Expand All @@ -2498,10 +2510,10 @@
- dept_unit
- fund
- funding_description
- date_added
- is_deleted
filter: {}
check: null
comment: No update permissions on audit fields
event_triggers:
- name: activity_log_moped_proj_funding
definition:
Expand All @@ -2523,22 +2535,20 @@
action: transform
template: |-
{
"query": "mutation InsertActivity($object: moped_activity_log_insert_input!, $project_id:Int!, $updated_at:timestamptz ) { insert_moped_activity_log_one(object: $object) { activity_id } update_moped_project_by_pk(pk_columns: {project_id: $project_id}, _set: {updated_at: $updated_at}) { updated_at }}",
"variables": {
"object": {
"record_id": {{ $body.event.data.new.proj_funding_id }},
"record_type": {{ $body.table.name }},
"activity_id": {{ $body.id }},
"record_project_id": {{ $body.event.data.new.project_id }},
"record_data": {"event": {{ $body.event }}},
"description": [{"newSchema": "true"}],
"operation_type": {{ $body.event.op }},
"updated_by_user_id": {{ $session_variables?['x-hasura-user-db-id'] ?? 1}}
},
"updated_at": {{$body.created_at}},
"project_id": {{$body.event.data.new.project_id}}
}
}
"query": "mutation InsertActivity( $object: moped_activity_log_insert_input!) { insert_moped_activity_log_one(object: $object) { activity_id } }",
"variables": {
"object": {
"record_id": {{ $body.event.data.new.proj_funding_id }},
"record_type": {{ $body.table.name }},
"activity_id": {{ $body.id }},
"record_project_id": {{ $body.event.data.new.project_id }},
"record_data": {"event": {{ $body.event }}},
"description": [{"newSchema": "true"}],
"operation_type": {{ $body.event.op }},
"updated_by_user_id": {{ $session_variables?['x-hasura-user-db-id'] ?? 1}}
}
}
}
method: POST
query_params: {}
template_engine: Kriti
Expand Down
Loading

0 comments on commit 0300c10

Please sign in to comment.