-- Add bank account details to subscribers table
-- For airtime-to-cash transfers

ALTER TABLE subscribers ADD COLUMN IF NOT EXISTS bank_account_name VARCHAR(255) NULL AFTER sEmail;
ALTER TABLE subscribers ADD COLUMN IF NOT EXISTS bank_account_number VARCHAR(50) NULL AFTER bank_account_name;
ALTER TABLE subscribers ADD COLUMN IF NOT EXISTS bank_name VARCHAR(100) NULL AFTER bank_account_number;
ALTER TABLE subscribers ADD COLUMN IF NOT EXISTS bank_code VARCHAR(10) NULL AFTER bank_name;

-- Modify airtimetocash table to include new fields
ALTER TABLE airtimetocash ADD COLUMN IF NOT EXISTS bank_account_name VARCHAR(255) NULL AFTER amount;
ALTER TABLE airtimetocash ADD COLUMN IF NOT EXISTS bank_account_number VARCHAR(50) NULL AFTER bank_account_name;
ALTER TABLE airtimetocash ADD COLUMN IF NOT EXISTS bank_name VARCHAR(100) NULL AFTER bank_account_number;
ALTER TABLE airtimetocash ADD COLUMN IF NOT EXISTS fee DECIMAL(10, 2) DEFAULT 0 AFTER bank_name;
ALTER TABLE airtimetocash ADD COLUMN IF NOT EXISTS screenshot_url VARCHAR(500) NULL AFTER fee;
ALTER TABLE airtimetocash ADD COLUMN IF NOT EXISTS is_account_funding BOOLEAN DEFAULT 1 AFTER screenshot_url;
