-- Deploy gaia:2020-1-6_add_old_tag_category to mysql

BEGIN;

CREATE TABLE `api_old_tag_category` (
        `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
        `name` varchar(128) NOT NULL UNIQUE
        );
CREATE TABLE `api_tag_category_relation` (
        `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
        `tag_category_id_id` integer NOT NULL,
        `tag_id_id` integer NOT NULL
        );
CREATE INDEX `api_old_tag_category_name_a7da2567` ON `api_old_tag_category` (`name`);

COMMIT;
