-- Deploy gaia:2018_07_05_create_index_function to mysql

BEGIN;

CREATE TABLE `api_index_function` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `title` varchar(30) NOT NULL,
    `user_type` varchar(2) NOT NULL,
    `start_time` datetime(6) NOT NULL,
    `end_time` datetime(6),
    `is_online` bool NOT NULL,
    `card_data` longtext NOT NULL
)
;

ALTER TABLE `api_gmhome_sideskidcategory` ADD COLUMN `slide_icon` varchar(1024) NOT NULL default '';

ALTER TABLE `api_gadget` ADD COLUMN `user_type` varchar(2) NOT NULL default '0';

COMMIT;
