-- Deploy gaia:area_2018_04_26 to mysql

BEGIN;

CREATE TABLE `api_cityscale` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `city_id` varchar(40) NOT NULL UNIQUE,
    `native` integer UNSIGNED NOT NULL,
    `nearby` integer UNSIGNED NOT NULL,
    `nation` integer UNSIGNED NOT NULL
)
;
ALTER TABLE `api_cityscale` ADD CONSTRAINT `city_id_refs_id_5dbb4b8b` FOREIGN KEY (`city_id`) REFERENCES `api_city` (`id`);

ALTER TABLE `api_city` ADD COLUMN  `level` integer UNSIGNED NOT NULL DEFAULT 4;

COMMIT;
