-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1631 from NASA-AMMOS/fix/before-delete-return-old
Fix "before delete" trigger on Scheduling Specification Conditions
- Loading branch information
Showing
4 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
deployment/hasura/migrations/Aerie/13_before_delete_trigger_fix/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
create or replace function scheduler.increment_spec_revision_on_conditions_spec_delete() | ||
returns trigger | ||
security definer | ||
language plpgsql as $$ | ||
begin | ||
update scheduler.scheduling_specification | ||
set revision = revision + 1 | ||
where id = new.specification_id; | ||
return new; | ||
end; | ||
$$; | ||
call migrations.mark_migration_rolled_back('13'); |
12 changes: 12 additions & 0 deletions
12
deployment/hasura/migrations/Aerie/13_before_delete_trigger_fix/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
create or replace function scheduler.increment_spec_revision_on_conditions_spec_delete() | ||
returns trigger | ||
security definer | ||
language plpgsql as $$ | ||
begin | ||
update scheduler.scheduling_specification | ||
set revision = revision + 1 | ||
where id = new.specification_id; | ||
return old; | ||
end; | ||
$$; | ||
call migrations.mark_migration_applied('13'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters