Skip to content

Commit

Permalink
Fix repair_segment table start_time/end_time/state consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
adejanovski committed Oct 31, 2017
1 parent d6e5a10 commit 91e5464
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
--
-- Fix inconsistencies in the repair_segment table
-- to comply with new safety policies on segments
--

UPDATE repair_segment
SET end_time = NULL
WHERE end_time IS NOT NULL
AND state != 2;

UPDATE repair_segment
SET start_time = end_time
WHERE start_time is NULL
AND end_time IS NOT NULL;


Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
--
-- Fix inconsistencies in the repair_segment table
-- to comply with new safety policies on segments
--

UPDATE repair_segment
SET end_time = NULL
WHERE end_time IS NOT NULL
AND state != 2;

UPDATE repair_segment
SET start_time = end_time
WHERE start_time is NULL
AND end_time IS NOT NULL;


0 comments on commit 91e5464

Please sign in to comment.