-- Add "Open Form" button for Case Hours form
INSERT INTO form_buttons (form_id,label,action_type,action_payload,order_index)
SELECT 59,'Open Form','open-form',
  CONCAT('{"lookupTable":"ohs_incident_types","lookupField":', id,
         ',"valueColumn":"name","formColumn":"form_id"}'),1
FROM form_elements
WHERE form_id=59 AND field_name='classification'
ON CONFLICT (form_id,label) DO NOTHING;
