-- ============================================
-- ADD BANK DETAILS TO SUPPLIERS TABLE
-- Adds bank account information for suppliers
-- ============================================

-- Add bank details columns to suppliers table
ALTER TABLE `suppliers` 
ADD COLUMN `bankName` VARCHAR(200) NULL AFTER `mapLink`,
ADD COLUMN `accountHolderName` VARCHAR(200) NULL AFTER `bankName`,
ADD COLUMN `accountNumber` VARCHAR(50) NULL AFTER `accountHolderName`,
ADD COLUMN `branchName` VARCHAR(200) NULL AFTER `accountNumber`,
ADD COLUMN `bankCode` VARCHAR(20) NULL AFTER `branchName`;

-- Add indexes for better query performance
CREATE INDEX `idx_suppliers_bank_name` ON `suppliers`(`bankName`);
CREATE INDEX `idx_suppliers_account_number` ON `suppliers`(`accountNumber`);

-- Verify columns were added
SHOW COLUMNS FROM `suppliers` LIKE 'bank%';
SHOW COLUMNS FROM `suppliers` LIKE 'account%';

