-- Deploy gaia:api_20180130_create_table_api_ordercategory to mysql

BEGIN;

CREATE TABLE `api_ordercategory` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `order_id` varchar(12) NOT NULL UNIQUE,
    `category` integer NOT NULL DEFAULT 1
)
;
ALTER TABLE `api_ordercategory` ADD CONSTRAINT `order_id_refs_id_6507b7ab` FOREIGN KEY (`order_id`) REFERENCES `api_order` (`id`);

COMMIT;
