SET foreign_key_checks = 0;
CREATE TABLE account_to_api_registry (
                                           account_id int(11) NOT NULL,
                                           api_registry_id int(11) DEFAULT NULL,
                                           PRIMARY KEY (account_id),
                                           KEY account_to_api_registry_api_registry_api_registry_id_fk (api_registry_id),
                                           CONSTRAINT account_to_api_registry_account_account_id_fk FOREIGN KEY (account_id) REFERENCES account (account_id),
                                           CONSTRAINT account_to_api_registry_api_registry_api_registry_id_fk FOREIGN KEY (api_registry_id) REFERENCES api_registry (api_registry_id)
) engine = InnoDB;
SET foreign_key_checks = 1;