Tony Kang 1 سال پیش
والد
کامیت
cf42b908d9
1فایلهای تغییر یافته به همراه11 افزوده شده و 0 حذف شده
  1. 11 0
      sql/update.sql

+ 11 - 0
sql/update.sql

@@ -61,3 +61,14 @@ ALTER TABLE `zh_role_rpt_rel`
 ADD COLUMN `business_id` VARCHAR(45) NULL AFTER `sid`,
 ADD INDEX `bz_idx` (`tender_id` ASC, `business_id` ASC);
 ;
+
+update zh_rpt_archive A
+set A.tender_id = (select tid from zh_stage B where B.id = A.stage_id)
+where (A.stage_id is not null) && (A.stage_id > 0)
+;
+
+update zh_rpt_archive_encryption A
+set A.tender_id = (select tid from zh_stage B where B.id = A.stage_id)
+where (A.stage_id is not null) && (A.stage_id > 0)
+;
+