-- Deploy gaia:2018_07_26_create_api_nearby_city_to_es to mysql

BEGIN;

-- XXX Add DDLs here.
CREATE TABLE `api_transaction_nearby_city_to_es` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `city_id` varchar(40) NOT NULL,
    `nearby_city_id` varchar(40) NOT NULL
)
;
ALTER TABLE `api_transaction_nearby_city_to_es` ADD CONSTRAINT `city_id_refs_id_d3f82722` FOREIGN KEY (`city_id`) REFERENCES `api_city` (`id`);
ALTER TABLE `api_transaction_nearby_city_to_es` ADD CONSTRAINT `nearby_city_id_refs_id_d3f82722` FOREIGN KEY (`nearby_city_id`) REFERENCES `api_city` (`id`);


COMMIT;
