-- ============================================================
-- HeardCheck — Schedule Phase Migration
-- Run: mysql -u heardcheck -p heardcheck_db < schedule_upgrade.sql
-- ============================================================

USE heardcheck_db;

-- Add tip_amount to clock_entries (for clock-out tip logging)
ALTER TABLE clock_entries
  ADD COLUMN tip_amount DECIMAL(10,2) DEFAULT NULL AFTER clock_out;

-- Add status to shifts if not present
ALTER TABLE shifts
  ADD COLUMN status ENUM('scheduled','confirmed','completed','cancelled') NOT NULL DEFAULT 'scheduled' AFTER notes;

-- Ensure availability has available_date for specific day overrides
ALTER TABLE availability
  ADD COLUMN available_date DATE DEFAULT NULL AFTER day_of_week;
