
-- 栏目表增加字段

ALTER TABLE aijinan.live_channel
DROP COLUMN component_type,
DROP COLUMN component_layout,
DROP COLUMN component_count,
DROP COLUMN title_setting;

ALTER TABLE aijinan.live_channel
    ADD COLUMN component_type VARCHAR(20)  DEFAULT '组件A' COMMENT '组件类型',
ADD COLUMN component_layout VARCHAR(10)  DEFAULT '2*N' COMMENT '组件排布',
ADD COLUMN component_count INT DEFAULT 6 COMMENT '组件数量',
ADD COLUMN title_setting VARCHAR(50) DEFAULT '政务前沿、直播快讯' COMMENT '标题设置';


--

CREATE TABLE aijinan.live_channel_component (
                                                id INT AUTO_INCREMENT PRIMARY KEY COMMENT '主键ID',
                                                component_type VARCHAR(20) NOT NULL COMMENT '组件名称',
                                                component_ratio VARCHAR(20) COMMENT '组件宽高比',
                                                component_size VARCHAR(20) COMMENT '组件大小',
                                                default_layout VARCHAR(10) DEFAULT '2*N' COMMENT '默认组件排布',
                                                default_count INT DEFAULT 6 COMMENT '默认组件数量',
                                                default_title VARCHAR(50) DEFAULT '政务前沿、直播快讯' COMMENT '默认标题设置'
) COMMENT='组件表';

INSERT INTO aijinan.live_channel_component (component_type, component_ratio, component_size, default_layout, default_count, default_title)
VALUES
    ('组件A', '16:9', '164*92(px)', '1*N', 6, '政务前沿、直播快讯'),
    ('组件B', '16:9', '346*195(px)', '1*N', 6, '多元视界，综合大观'),
    ('组件C', '9:16', '161*286(px)', '1*N', 6, '活动盛况，不容错过'),
    ('lunbodatu', '16:9', '375*212(px)', '', 6, '');



alter table aijinan.live_scene
    ADD COLUMN hot_spot tinyint(1) DEFAULT '0' COMMENT '是否为热点',
    ADD COLUMN channel_display tinyint(1) DEFAULT '0' COMMENT '是否为栏目展示';

alter table aijinan.live_scene
drop COLUMN show_app;
