BEGIN;
CREATE TABLE `api_devicebinding` (`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `device` varchar(64) NULL, `activity_date` datetime(6) NOT NULL, `city_id` varchar(40) NULL, `province_id` varchar(40) NULL, `user_id` integer NOT NULL UNIQUE);
ALTER TABLE `api_devicebinding` ADD CONSTRAINT `api_devicebinding_city_id_f9e32e474996c7a_fk_api_city_id` FOREIGN KEY (`city_id`) REFERENCES `api_city` (`id`);
ALTER TABLE `api_devicebinding` ADD CONSTRAINT `api_devicebindin_province_id_540970335310493f_fk_api_province_id` FOREIGN KEY (`province_id`) REFERENCES `api_province` (`id`);
ALTER TABLE `api_devicebinding` ADD CONSTRAINT `api_devicebinding_user_id_65e41bd72938b09a_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);

COMMIT;
