-- Add verified columns to deploy_history table
-- Migration: 2026-01-26_add_verified_columns_to_deploy_history

ALTER TABLE deploy_history 
ADD COLUMN verified TINYINT(1) DEFAULT 0 AFTER status,
ADD COLUMN verified_by INT UNSIGNED NULL AFTER verified,
ADD COLUMN verified_at DATETIME NULL AFTER verified_by,
ADD COLUMN changelog TEXT NULL AFTER verified_at,
ADD KEY idx_verified (verified);

-- Add foreign key for verified_by
ALTER TABLE deploy_history 
ADD CONSTRAINT fk_deploy_history_verified_by 
FOREIGN KEY (verified_by) REFERENCES users(id) ON DELETE SET NULL;
