-- Deploy gaia:polymer_2020_03_02_create_table_polymer_relation_tag_v3 to mysql

BEGIN;

-- XXX Add DDLs here.
CREATE TABLE `api_polymer_tag_v3` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `tag_v3_id` integer NOT NULL,
    `polymer_id` integer NOT NULL,
    `is_online` bool NOT NULL,
    `create_time` datetime(6) NOT NULL,
    `update_time` datetime(6) NOT NULL,
    UNIQUE (`tag_v3_id`, `polymer_id`)
);

CREATE INDEX `api_polymer_tag_v3_eb20a4b7` ON `api_polymer_tag_v3` (`tag_v3_id`);
CREATE INDEX `api_polymer_tag_v3_c36fd9ee` ON `api_polymer_tag_v3` (`polymer_id`);

COMMIT;
