CREATE TABLE source_program
(
id
varchar(50) NOT NULL COMMENT '主键id',
base_program_id
varchar(50) NULL COMMENT '基准节目id',
source_code
varchar(50) NOT NULL COMMENT '源编码',
name
varchar(1024) NULL COMMENT '节目名称',
set_num
int NULL COMMENT '集数',
intro
text NULL COMMENT '分剧情介绍',
duration
int NULL COMMENT '时长,单位秒',
horizontal_poster
varchar(1024) NULL COMMENT '横海报',
vertical_poster
varchar(1024) NULL COMMENT '竖海报',
preview_state
tinyint NOT NULL DEFAULT "0" COMMENT '是否预告片',
create_user
varchar(255) NOT NULL COMMENT '创建人',
create_time
datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
update_user
varchar(255) NULL COMMENT '更新人',
update_time
datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
INDEX idx_base_program_id (base_program_id
) USING INVERTED,
INDEX idx_source_code (source_code
) USING INVERTED,
INDEX idx_name (name
) USING INVERTED
) ENGINE=OLAP
UNIQUE KEY(id
)
COMMENT '源节目'
DISTRIBUTED BY HASH(id
) BUCKETS 48
PROPERTIES (
"replication_allocation" = "tag.location.default: 3",
"colocate_with" = "source_program_id_group",
"enable_unique_key_merge_on_write" = "true",
"light_schema_change" = "true",
"store_row_column" = "true"
);