

CREATE TABLE brands (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100),
    invoice_prefix VARCHAR(10),
    vat_enabled BOOLEAN DEFAULT 0,
    vat_rate DECIMAL(5,4) DEFAULT 0.20,

    stripe_account_id VARCHAR(100),
    stripe_secret_key VARCHAR(255),

    gocardless_account_id VARCHAR(100),
    gocardless_access_token VARCHAR(255),

    bank_name VARCHAR(100),
    bank_sort_code VARCHAR(20),
    bank_account_number VARCHAR(20),

    pdf_template VARCHAR(100)
);

ALTER TABLE invoices ADD brand_id INT;

