/*
 * Copyright ©  2023 Thomas J Collinson
 * All rights reserved
 */

create table account_field_alias
(
    invoice_idfk int unsigned not null,
    field        VARCHAR(50)  not null,
    alias        VARCHAR(50)  not null,
    constraint account_field_alias_pk
        primary key (invoice_idfk, field),
    constraint account_field_alias_invoice_accounts_id_fk
        foreign key (invoice_idfk) references invoice_accounts (id)
            on update cascade on delete cascade
)
    collate = utf8mb4_unicode_ci;