/*体育后台 sql 变更记录*/



/**
Tank.peng 
2019/10/23
各球类赛事表 新增字段 handle_mark 处理备注(赛事取消/作废描述)
*/

ALTER TABLE st_zq_competition ADD COLUMN handle_mark varchar(100) COLLATE "pg_catalog"."default";
COMMENT ON COLUMN "st_zq_competition"."handle_mark" IS '处理备注(赛事取消/作废描述)';

ALTER TABLE st_lq_competition ADD COLUMN handle_mark varchar(100) COLLATE "pg_catalog"."default";
COMMENT ON COLUMN "st_lq_competition"."handle_mark" IS '处理备注(赛事取消/作废描述)';

ALTER TABLE st_wq_competition ADD COLUMN handle_mark varchar(100) COLLATE "pg_catalog"."default";
COMMENT ON COLUMN "st_wq_competition"."handle_mark" IS '处理备注(赛事取消/作废描述)';

ALTER TABLE st_bq_competition ADD COLUMN handle_mark varchar(100) COLLATE "pg_catalog"."default";
COMMENT ON COLUMN "st_bq_competition"."handle_mark" IS '处理备注(赛事取消/作废描述)';

/**
Tank.peng
2019/11/1
篮球结果表 新增 字段
*/
ALTER TABLE st_lq_result ADD COLUMN s_home_score int2 NOT NULL DEFAULT 0;
COMMENT ON COLUMN "st_lq_result"."s_home_score" IS '下半场-主队进球数';

ALTER TABLE st_lq_result ADD COLUMN s_guest_score int2 NOT NULL DEFAULT 0;
COMMENT ON COLUMN "st_lq_result"."s_guest_score" IS '下半场-客队进球数';

/**
Tank.peng
2019/11/5
新增玩法代码
*/
INSERT INTO "public"."st_odds_code" VALUES (498, 'wq', 'ch_3', '第三盘冠军主队', 183, 0,3001007);
INSERT INTO "public"."st_odds_code" VALUES (499, 'wq', 'cg_3', '第三盘冠军客队', 183, 0,3001008);

/**
Tank.peng
2019/11/11
修改字段注释
*/
COMMENT ON COLUMN "money_buy_match"."is_rolling" IS '投注赛事状态 默认0  1滚球 2即将 3今日 4早盘 5串场 6冠军';

/**
Tank.peng
2019/11/11
追加字段
*/
ALTER TABLE money_buy_match ADD COLUMN roll_time varchar(64) COLLATE "pg_catalog"."default";
COMMENT ON COLUMN "money_buy_match"."roll_time" IS '当是滚球投注时 赛事进行时间';

ALTER TABLE money_buy_match ADD COLUMN home_score int2 NOT NULL DEFAULT 0;
COMMENT ON COLUMN "money_buy_match"."home_score" IS '当是滚球投注时 当前主队得分';
ALTER TABLE money_buy_match ADD COLUMN guest_score int2 NOT NULL DEFAULT 0;
COMMENT ON COLUMN "money_buy_match"."guest_score" IS '当是滚球投注时 当前客队得分';

/**
Tank.peng
2019/11/13
追加字段
*/
ALTER TABLE st_zq_result ADD COLUMN manual_result json DEFAULT '{"half_corner":{"home":"","guest":""},"all_corner":{"home":"","guest":""},"half_penalty":{"home":"","guest":""},"all_penalty":{"home":"","guest":""},"half":{"home":"","guest":""},"all":{"home":"","guest":""},"first_score":{"time":""}}'::json;
COMMENT ON COLUMN "st_zq_result"."manual_result" IS '当手动修改比分时，存储调整后的结果json';

ALTER TABLE st_lq_result ADD COLUMN manual_result json DEFAULT '{"1":{"home":"","guest":""},"2":{"home":"","guest":""},"3":{"home":"","guest":""},"4":{"home":"","guest":""},"5":{"home":"","guest":""},"6":{"home":"","guest":""},"all":{"home":"","guest":""}}'::json;
COMMENT ON COLUMN "st_lq_result"."manual_result" IS '当手动修改比分时，存储调整后的结果json';

ALTER TABLE st_wq_result ADD COLUMN manual_result json DEFAULT '{"1":{"home":"","guest":""},"2":{"home":"","guest":""},"3":{"home":"","guest":""},"4":{"home":"","guest":""},"5":{"home":"","guest":""},"all":{"home":"","guest":""}}'::json;
COMMENT ON COLUMN "st_wq_result"."manual_result" IS '当手动修改比分时，存储调整后的结果json';

ALTER TABLE st_bq_result ADD COLUMN manual_result json DEFAULT '{"1":{"home":"","guest":""},"2":{"home":"","guest":""},"3":{"home":"","guest":""},"4":{"home":"","guest":""},"5":{"home":"","guest":""},"6":{"home":"","guest":""},"7":{"home":"","guest":""},"8":{"home":"","guest":""},"9":{"home":"","guest":""},"other":{"home":"","guest":""},"five":{"home":"","guest":""},"all":{"home":"","guest":""}}'::json;
COMMENT ON COLUMN "st_bq_result"."manual_result" IS '当手动修改比分时，存储调整后的结果json';
