-- migration_add_bank_account_number.sql
USE financeiro;

ALTER TABLE banks ADD COLUMN account_number VARCHAR(30) NOT NULL AFTER agency;

-- Ajusta índice único (se der erro por já existir, ignore)
ALTER TABLE banks DROP INDEX uk_bank;
ALTER TABLE banks ADD UNIQUE KEY uk_bank (bank_number, agency, account_number, account_type);
