-- +goose Up
-- +goose StatementBegin
-- The corrective-action sign moved from the complaint to the action_signoffs table,
-- and action_signoffs became a pure sign record (no action text / audit / soft-delete).
ALTER TABLE complaints
  DROP COLUMN action_signed_at,
  DROP COLUMN action_signed_by;

ALTER TABLE action_signoffs
  DROP COLUMN action_taken,
  DROP COLUMN created_by,
  DROP COLUMN updated_by,
  DROP COLUMN deleted_at,
  DROP COLUMN deleted_by;
-- +goose StatementEnd

-- +goose Down
-- +goose StatementBegin
ALTER TABLE complaints
  ADD COLUMN action_signed_at DATETIME(3) NULL AFTER action_taken,
  ADD COLUMN action_signed_by BINARY(16) NULL AFTER action_signed_at;

ALTER TABLE action_signoffs
  ADD COLUMN action_taken TEXT NULL AFTER complaint_id,
  ADD COLUMN created_by BINARY(16) NULL AFTER created_at,
  ADD COLUMN updated_by BINARY(16) NULL AFTER updated_at,
  ADD COLUMN deleted_at DATETIME(3) NULL,
  ADD COLUMN deleted_by BINARY(16) NULL,
  ADD KEY idx_action_signoffs_deleted_at (deleted_at);
-- +goose StatementEnd
