-- Deploy gaia:community_2015_12_13_create_table_community_topic_sticky to mysql

BEGIN;

CREATE TABLE `community_topic_sticky` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `topic_id` integer NOT NULL,
    `desc` varchar(200) NOT NULL,
    `ordering` integer NOT NULL,
    `is_online` bool NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE `community_topic_sticky` ADD CONSTRAINT `topic_id_refs_id_dbbd9cd6` FOREIGN KEY (`topic_id`) REFERENCES `api_problem` (`id`);

COMMIT;
