ALTER TABLE moderation_log
    ADD COLUMN IF NOT EXISTS old_status VARCHAR(50),
    ADD COLUMN IF NOT EXISTS new_status VARCHAR(50);

ALTER TABLE moderation_log
    DROP CONSTRAINT IF EXISTS moderation_log_action_check;

ALTER TABLE moderation_log
    ADD CONSTRAINT moderation_log_action_check
    CHECK (action IN ('approve', 'reject', 'request_changes', 'publish', 'archive',
                      'soft_delete', 'hard_delete', 'restore', 'revoke', 'rework'));
