-- Deploy gaia:api_2016_12_06_add_table_service_recommand to mysql

BEGIN;

-- XXX Add DDLs here.
CREATE TABLE `api_servicerecommend` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `service_id` integer NOT NULL UNIQUE,
    `is_recommend` bool NOT NULL,
    `rank` integer NOT NULL,
    `is_delete` bool NOT NULL
)
;
ALTER TABLE `api_servicerecommend` ADD CONSTRAINT `service_id_refs_id_e5ddd1f5` FOREIGN KEY (`service_id`) REFERENCES `api_service` (`id`);

COMMIT;
