Skip to content

Commit 84d78d3

Browse files
authored
Merge pull request #1601 from NASA-AMMOS/fix/proc-sched-migration-error
Procedural scheduling migration fix patch
2 parents f271123 + 1d9d5d1 commit 84d78d3

File tree

1 file changed

+15
-0
lines changed
  • deployment/hasura/migrations/Aerie/10_procedural_scheduling

1 file changed

+15
-0
lines changed

deployment/hasura/migrations/Aerie/10_procedural_scheduling/up.sql

+15
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ from scheduler.scheduling_request as sr
2929
where sr.analysis_id = sga.analysis_id
3030
and sga.goal_id = ssg.goal_id;
3131

32+
-- v3.1.1 migration patch addition
33+
update scheduler.scheduling_goal_analysis
34+
set goal_invocation_id = -1 * goal_id
35+
where goal_invocation_id is null;
36+
3237
alter table scheduler.scheduling_goal_analysis
3338
-- explictly set not null before PKing
3439
alter column goal_invocation_id set not null,
@@ -53,6 +58,11 @@ from scheduler.scheduling_request as sr
5358
where sr.analysis_id = sgaca.analysis_id
5459
and sgaca.goal_id = ssg.goal_id;
5560

61+
-- v3.1.1 migration patch addition
62+
update scheduler.scheduling_goal_analysis_created_activities
63+
set goal_invocation_id = -1 * goal_id
64+
where goal_invocation_id is null;
65+
5666
alter table scheduler.scheduling_goal_analysis_created_activities
5767
drop column goal_id,
5868
drop column goal_revision,
@@ -85,6 +95,11 @@ from scheduler.scheduling_request as sr
8595
where sr.analysis_id = sgasa.analysis_id
8696
and sgasa.goal_id = ssg.goal_id;
8797

98+
-- v3.1.1 migration patch addition
99+
update scheduler.scheduling_goal_analysis_satisfying_activities
100+
set goal_invocation_id = -1 * goal_id
101+
where goal_invocation_id is null;
102+
88103
alter table scheduler.scheduling_goal_analysis_satisfying_activities
89104
drop column goal_id,
90105
drop column goal_revision,

0 commit comments

Comments
 (0)