-
Notifications
You must be signed in to change notification settings - Fork 25
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 #3667 from ProjectSidewalk/develop
v7.20.7
- Loading branch information
Showing
43 changed files
with
847 additions
and
430 deletions.
There are no files selected for viewing
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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,27 @@ | ||
# --- !Ups | ||
INSERT INTO tag (tag_id, label_type_id, tag, mutually_exclusive_with) SELECT 71, label_type_id, 'debris', NULL FROM label_type WHERE label_type.label_type = 'SurfaceProblem'; | ||
|
||
# --- !Downs | ||
UPDATE config SET excluded_tags = REPLACE(excluded_tags, ' "debris"', ''); | ||
|
||
UPDATE label_history SET tags = array_remove(tags, 'debris'); | ||
|
||
-- Delete entries in the label_history table that no longer represent a change in history after removing the tag. | ||
DELETE FROM label_history | ||
WHERE label_history_id IN ( | ||
SELECT label_history_id | ||
FROM ( | ||
SELECT label_history_id, label_id, severity, tags, | ||
LAG(severity) OVER (PARTITION BY label_id ORDER BY edit_time) AS prev_severity, | ||
LAG(tags) OVER (PARTITION BY label_id ORDER BY edit_time) AS prev_tags | ||
FROM label_history | ||
) subquery | ||
WHERE severity = prev_severity | ||
AND tags = prev_tags | ||
); | ||
|
||
DELETE FROM tag | ||
USING label_type | ||
WHERE tag.label_type_id = label_type.label_type_id | ||
AND label_type.label_type = 'SurfaceProblem' | ||
AND tag.tag = 'debris'; |
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,30 @@ | ||
# --- !Ups | ||
INSERT INTO tag (tag_id, label_type_id, tag, mutually_exclusive_with) SELECT 70, label_type_id, 'mailbox', NULL FROM label_type WHERE label_type.label_type = 'Obstacle'; | ||
|
||
-- Hide the mailbox tag in non-US cities. | ||
UPDATE config SET excluded_tags = REPLACE(excluded_tags, '"]', '" "mailbox"]') WHERE current_schema() IN ('sidewalk_spgg', 'sidewalk_cdmx', 'sidewalk_amsterdam', 'sidewalk_la_piedad', 'sidewalk_zurich', 'sidewalk_taipei', 'sidewalk_new_taipei', 'sidewalk_keelung', 'sidewalk_cuenca', 'sidewalk_burnaby', 'sidewalk_auckland'); | ||
|
||
# --- !Downs | ||
UPDATE config SET excluded_tags = REPLACE(excluded_tags, ' "mailbox"', ''); | ||
|
||
UPDATE label_history SET tags = array_remove(tags, 'mailbox'); | ||
|
||
-- Delete entries in the label_history table that no longer represent a change in history after removing the tag. | ||
DELETE FROM label_history | ||
WHERE label_history_id IN ( | ||
SELECT label_history_id | ||
FROM ( | ||
SELECT label_history_id, label_id, severity, tags, | ||
LAG(severity) OVER (PARTITION BY label_id ORDER BY edit_time) AS prev_severity, | ||
LAG(tags) OVER (PARTITION BY label_id ORDER BY edit_time) AS prev_tags | ||
FROM label_history | ||
) subquery | ||
WHERE severity = prev_severity | ||
AND tags = prev_tags | ||
); | ||
|
||
DELETE FROM tag | ||
USING label_type | ||
WHERE tag.label_type_id = label_type.label_type_id | ||
AND label_type.label_type = 'Obstacle' | ||
AND tag.tag = 'mailbox'; |
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,5 @@ | ||
# --- !Ups | ||
INSERT INTO version VALUES ('7.20.7', now(), 'Adds new tags and speed limit indicator to Explore/Validate.'); | ||
|
||
# --- !Downs | ||
DELETE FROM version WHERE version_id = '7.20.7'; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
Oops, something went wrong.