CREATE TABLE authorized_field_grants (
    id SERIAL PRIMARY KEY,
    authorized_field_id INTEGER NOT NULL,
    account_id INTEGER NOT NULL,

    CONSTRAINT authorized_field_grants_authorized_field_id_fkey FOREIGN KEY (authorized_field_id) REFERENCES authorized_fields (id)
        ON UPDATE CASCADE,
    CONSTRAINT authorized_field_grants_account_id_fkey FOREIGN KEY (account_id) REFERENCES accounts (id)
        ON UPDATE CASCADE,
    UNIQUE (authorized_field_id, account_id)
);