-- Track the lifecycle role of each submission so the permit state machine can be
-- enforced and handover history can be reconstructed.
--   opening   -> first GENERAL submission, starts the validity window
--   (null)    -> specialized permit submissions under the same permit
--   handover  -> permit handed to the next person (repeatable, keeps permit active)
--   handback  -> final handback/cancellation, closes the permit forever
--   closing   -> legacy manual closing submission
ALTER TABLE `ptw_submissions`
  ADD COLUMN `submission_role` VARCHAR(32) NULL AFTER `form_id`;
