-- Deploy gaia:2017_07_27_create_api_article to mysql

BEGIN;

-- create api_article.
CREATE TABLE `api_article` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `article_id` integer UNIQUE,
    `article_type` varchar(10) NOT NULL,
    `is_online` bool NOT NULL,
    `created_time` datetime(6) NOT NULL,
    `last_modified` datetime(6)
)
;

-- add diary_id for api_columncard.
ALTER TABLE `api_columncard` add column `diary_id` integer;

-- add profession for api_columnist.
ALTER TABLE `api_columnist` add column `profession` varchar(20);


COMMIT;
