-- Deploy gaia:zhibo_2016_12_20_create_table_api_zhiboconfig to mysql

BEGIN;

CREATE TABLE `api_zhiboconfig` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `description` varchar(10) NOT NULL,
    `foreshowcover_img` varchar(128) NOT NULL,
    `foreshowpage_img` varchar(128) NOT NULL,
    `anchor_user_id` integer NOT NULL,
    `start_time` datetime(6) NOT NULL,
    `end_time` datetime(6) NOT NULL,
    `zhibo_time` datetime(6) NOT NULL,
    `is_online` bool NOT NULL
)
;
ALTER TABLE `api_zhiboconfig` ADD CONSTRAINT `anchor_user_id_refs_id_9338efc3` FOREIGN KEY (`anchor_user_id`) REFERENCES `auth_user` (`id`);

COMMIT;
