From 9fb7e706ecaf1051b35c885111ffd4e5516ecb0e Mon Sep 17 00:00:00 2001 From: y-ono-r <95060536+y-ono-r@users.noreply.github.com> Date: Mon, 1 Aug 2022 20:02:29 +0900 Subject: [PATCH] =?UTF-8?q?fix:=E4=B8=8D=E8=B6=B3=E9=A0=85=E7=9B=AE?= =?UTF-8?q?=E3=81=A8=E8=A8=AD=E5=AE=9A=E9=A0=85=E7=9B=AE=E3=83=9F=E3=82=B9?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rds_mysql/stored_procedure/crm_history.sql | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rds_mysql/stored_procedure/crm_history.sql b/rds_mysql/stored_procedure/crm_history.sql index 0777912f..00279493 100644 --- a/rds_mysql/stored_procedure/crm_history.sql +++ b/rds_mysql/stored_procedure/crm_history.sql @@ -18,7 +18,9 @@ BEGIN UPDATE @@target_table SET start_datetime = @@target_column - , end_datetime = "9999-12-31 00:00:00" + , end_datetime = "9999-12-31 00:00:00" + , upd_user = CURRENT_USER() + , upd_date = CURRENT_TIMESTAMP() WHERE start_datetime IS NULL AND end_datetime IS NULL @@ -56,7 +58,9 @@ BEGIN ON tt.id = mht.id AND tt.start_datetime = mht.min_start_datetime SET - start_datetime = mht.max_start_datetime - INTERVAL 1 SECOND + end_datetime = mht.max_start_datetime - INTERVAL 1 SECOND + , upd_user = CURRENT_USER() + , upd_date = CURRENT_TIMESTAMP() WHERE mht.id IS NOT NULL ';