ALTER TABLE  "user_list_act"
   ADD COLUMN "exchange_num" int4 DEFAULT 0,
   ADD COLUMN "ref_act_id" int4;

COMMENT ON COLUMN "user_list_act"."ref_act_id" IS '关联list活动id';


ALTER TABLE "goods_act_record"
   ADD COLUMN "user_limit_num" int4 DEFAULT 0,
  ADD COLUMN "day_limit_num" int4 DEFAULT 0,
  ADD COLUMN "total_limit_num" int4 DEFAULT 0,
  ADD COLUMN "sort_num" int4 DEFAULT 0,
  ADD COLUMN "start_time" timestamp,
  ADD COLUMN "end_time" timestamp;

COMMENT ON COLUMN "goods_act_record"."user_limit_num" IS '用户限购数量';

COMMENT ON COLUMN "goods_act_record"."day_limit_num" IS '每日限购总量';

COMMENT ON COLUMN "goods_act_record"."total_limit_num" IS '总计限购数量';

COMMENT ON COLUMN "goods_act_record"."sort_num" IS '排序值';

COMMENT ON COLUMN "goods_act_record"."start_time" IS '活动开始时间';

COMMENT ON COLUMN "goods_act_record"."end_time" IS '活动结束时间';


CREATE INDEX "s_act_id" ON "user_list_act" USING btree (
   "ref_act_id"
   );