CREATE TABLE bank_code_aliases (
    id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
    bank_id INT UNSIGNED NOT NULL,
    alias_code VARCHAR(20) NOT NULL,
    created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    CONSTRAINT fk_bank_code_alias_bank FOREIGN KEY (bank_id) REFERENCES bank_catalog (id) ON DELETE CASCADE,
    UNIQUE KEY uq_bank_alias_code (alias_code)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
