--- drop_status_resolution_working_with_tickets

DELETE FROM statuses
WHERE resolution_id IN (
    SELECT id
    FROM status_resolutions
    WHERE parent_status_type = (SELECT id FROM status_types WHERE name = 'active')
      AND weigth = 2
);

DELETE FROM status_resolution_titles
WHERE resolution_id = (
    SELECT id
    FROM status_resolutions
    WHERE parent_status_type = (SELECT id FROM status_types WHERE name = 'active')
      AND weigth = 2
    LIMIT 1
    )
  AND lang IN ('RU', 'EN');

DELETE FROM status_resolutions
WHERE parent_status_type = (SELECT id FROM status_types WHERE name = 'active')
  AND weigth = 2;