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

CREATE TABLE `sub_account_reference_field`
(
    `invoice_account_idfk` INT UNSIGNED NOT NULL,
    `field_name`           VARCHAR(20)  NOT NULL,
    CONSTRAINT `sub_account_reference_field_pk`
        PRIMARY KEY (`invoice_account_idfk`),
    CONSTRAINT `sub_account_reference_field_invoice_accounts_id_fk`
        FOREIGN KEY (`invoice_account_idfk`) REFERENCES `invoice_accounts` (`id`)
            ON UPDATE CASCADE ON DELETE CASCADE
);