-- Migration: Rename submitted_date to submitted_at in hmrc_final_declarations table
-- Date: 2025-12-14

-- ============================================================
-- UP Migration - Apply Changes
-- ============================================================

-- Rename the column from submitted_date to submitted_at
ALTER TABLE `hmrc_final_declarations`
CHANGE COLUMN `submitted_date` `submitted_at` DATETIME NULL DEFAULT NULL;

-- Note: This aligns with the naming convention used for other timestamp fields:
-- - declared_at
-- - paid_at
-- - created_at
-- - updated_at

-- ============================================================
-- DOWN Migration - Rollback Changes (if needed)
-- ============================================================

-- To rollback, uncomment the following:
-- ALTER TABLE `hmrc_final_declarations`
-- CHANGE COLUMN `submitted_at` `submitted_date` DATETIME NULL DEFAULT NULL;
