Commit 823e7cbc by hejiangming

no message

parent 682eb72a
......@@ -34,6 +34,7 @@ if __name__ == '__main__':
engine = DBUtil.get_db_engine(db_type, site_name)
# 根据主表 复制结构 创建天的子表 day_flag 是一个自动计算列,由 is_1_day_flag + is_7_day_flag + is_30_day_flag
DBUtil.engine_exec_sql(engine, f"""
drop table if exists {export_tb};
create table {export_tb} ( like {export_master_tb} including defaults including constraints );
alter table {export_tb} drop if exists day_flag ;
alter table {export_tb} add column day_flag varchar(10) generated always as (is_1_day_flag + is_7_day_flag + is_30_day_flag) stored;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment