Skip to content

Commit

Permalink
Merge pull request #1105 from cityofaustin/jc-delete-construction-ins…
Browse files Browse the repository at this point in the history
…pection-work-type

Deletes "Construction Inspection" work type
  • Loading branch information
johnclary authored Aug 17, 2023
2 parents c45426c + 60a3110 commit 94135cf
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
INSERT INTO moped_work_types (name, key) VALUES
('Construction Inspection', 'construction_inspection');

-- add as allowed work type for signal components
-- see 1691442787520_refresh-component-work-types
WITH inserts_todo AS (
SELECT
id AS work_type_id,
component_id
FROM (
values('construction_inspection')) AS data (work_type_key)
LEFT JOIN moped_components ON TRUE
LEFT JOIN moped_work_types mwt ON data.work_type_key = mwt.key
WHERE
moped_components.is_deleted = FALSE
AND lower(moped_components.component_name) = 'signal'
AND(lower(moped_components.component_subtype) = 'traffic'
OR lower(moped_components.component_subtype) = 'phb')
) INSERT INTO moped_component_work_types (work_type_id, component_id)
SELECT
*
FROM
inserts_todo;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DELETE FROM moped_work_types WHERE KEY = 'construction_inspection';

0 comments on commit 94135cf

Please sign in to comment.