-- Add payment columns to hmrc_final_declarations table
-- Run this SQL directly on your database

ALTER TABLE `hmrc_final_declarations`
ADD COLUMN `is_paid` TINYINT(1) NOT NULL DEFAULT 0 AFTER `declared_at`,
ADD COLUMN `paid_at` DATETIME NULL AFTER `is_paid`,
ADD COLUMN `payment_method` VARCHAR(255) NULL AFTER `paid_at`,
ADD COLUMN `payment_reference` VARCHAR(255) NULL AFTER `payment_method`;

-- Add indexes for better query performance
CREATE INDEX `idx_is_paid` ON `hmrc_final_declarations` (`is_paid`);
CREATE INDEX `idx_paid_at` ON `hmrc_final_declarations` (`paid_at`);

-- Verify the changes
DESCRIBE `hmrc_final_declarations`;
