-- Deploy gaia:communit_2015_11_27_create_table_community_article to mysql

BEGIN;
CREATE TABLE `community_article` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `title` varchar(128) NOT NULL,
    `banner` varchar(128) NOT NULL,
    `description` longtext NOT NULL,
    `start_time` datetime(6) NOT NULL,
    `end_time` datetime(6),
    `is_online` bool NOT NULL,
    `type` varchar(1) NOT NULL,
    `topic_id` integer
)
;
ALTER TABLE `community_article` ADD CONSTRAINT `topic_id_refs_id_9e7693ef` FOREIGN KEY (`topic_id`) REFERENCES `api_problem` (`id`);

COMMIT;
