-- Deploy gaia:2018_07_18_create_api_nearby_city to mysql

BEGIN;

-- XXX Add DDLs here.
CREATE TABLE `api_transaction_nearby_city` (
    `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` ADD CONSTRAINT `city_id_refs_id_a9a9e01d` FOREIGN KEY (`city_id`) REFERENCES `api_city` (`id`);
ALTER TABLE `api_transaction_nearby_city` ADD CONSTRAINT `nearby_city_id_refs_id_a9a9e01d` FOREIGN KEY (`nearby_city_id`) REFERENCES `api_city` (`id`);

COMMIT;
