diff --git a/deployment/hasura/migrations/AerieMerlin/19_users/up.sql b/deployment/hasura/migrations/AerieMerlin/19_users/up.sql index d72093a47c..946d1d364b 100644 --- a/deployment/hasura/migrations/AerieMerlin/19_users/up.sql +++ b/deployment/hasura/migrations/AerieMerlin/19_users/up.sql @@ -296,6 +296,10 @@ comment on column merge_request.requester_username is e'' comment on column merge_request.reviewer_username is e'' 'The user who reviews this merge request. Is empty until the request enters review.'; +-- REMOVE SYSTEM USERS IF THEY WERE MISTAKENLY ADDED ABOVE +delete from metadata.users +where username = 'Aerie Legacy' or username = 'Mission Model'; + -- UPDATE USERS ALLOWED ROLES insert into metadata.users_allowed_roles(username, allowed_role) select u.username, roles.role diff --git a/deployment/hasura/migrations/AerieMerlin/26_create_snapshot_signature_change/down.sql b/deployment/hasura/migrations/AerieMerlin/26_create_snapshot_signature_change/down.sql index 85e1c57e88..fcaf93b870 100644 --- a/deployment/hasura/migrations/AerieMerlin/26_create_snapshot_signature_change/down.sql +++ b/deployment/hasura/migrations/AerieMerlin/26_create_snapshot_signature_change/down.sql @@ -54,3 +54,5 @@ comment on function create_snapshot(integer, text, text) is e'' ' - The tags on those activities' ' - When the snapshot was taken' ' - Optionally: who took the snapshot and a name'; + +call migrations.mark_migration_rolled_back('26'); diff --git a/deployment/hasura/migrations/AerieScheduler/7_definition_consistency/up.sql b/deployment/hasura/migrations/AerieScheduler/7_definition_consistency/up.sql index 08d021d915..871994f93c 100644 --- a/deployment/hasura/migrations/AerieScheduler/7_definition_consistency/up.sql +++ b/deployment/hasura/migrations/AerieScheduler/7_definition_consistency/up.sql @@ -1,9 +1,17 @@ alter table scheduling_goal - alter column description set default '', + alter column description set default ''; +update scheduling_goal + set description = default + where description is null; +alter table scheduling_goal alter column description set not null; alter table scheduling_condition - alter column description set default '', + alter column description set default ''; +update scheduling_condition + set description = default + where description is null; +alter table scheduling_condition alter column description set not null; call migrations.mark_migration_applied('7');