-- Deploy gaia:api_2015_12_03_create_table_api_tag_managers to mysql

BEGIN;

CREATE TABLE `api_tag_managers` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `tag_id` integer NOT NULL,
    `person_id` char(32) NOT NULL,
    UNIQUE (`tag_id`, `person_id`)
);

ALTER TABLE `api_tag_managers` ADD CONSTRAINT `tag_id_refs_id_a5fec64e` FOREIGN KEY (`tag_id`) REFERENCES `api_tag` (`id`);

COMMIT;
