-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix repair_segment table start_time/end_time/state consistency
- Loading branch information
1 parent
d6e5a10
commit 91e5464
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
src/server/src/main/resources/db/h2/V5_0_0__fix_repair_segment_table.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,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; | ||
|
||
|
16 changes: 16 additions & 0 deletions
16
src/server/src/main/resources/db/postgres/V5_0_0__fix_repair_segment_table.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,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; | ||
|
||
|