From 08783194716ea0aeb0433cd188876e74f09d56d3 Mon Sep 17 00:00:00 2001 From: Greg Dean Date: Tue, 16 Jul 2024 08:59:09 -0400 Subject: [PATCH] update log table sql migration query to be more efficient --- configuration/etl/etl_sql.d/migration/cleanup_log_table.sql | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/configuration/etl/etl_sql.d/migration/cleanup_log_table.sql b/configuration/etl/etl_sql.d/migration/cleanup_log_table.sql index ec1dbe8da1..edb64efc58 100644 --- a/configuration/etl/etl_sql.d/migration/cleanup_log_table.sql +++ b/configuration/etl/etl_sql.d/migration/cleanup_log_table.sql @@ -6,11 +6,8 @@ UPDATE mod_logger.log_table as lt JOIN (SELECT FROM mod_logger.log_table as l2 WHERE l2.ident IN ('rest.logger.db', 'controller.log') - AND l2.priority = 6) AS data JOIN moddb.SessionManager sm ON sm.session_token = data.token JOIN moddb.Users u ON u.id = sm.user_id + AND l2.priority = 6) AS data on data.id = lt.id JOIN moddb.SessionManager sm ON sm.session_token = data.token JOIN moddb.Users u ON u.id = sm.user_id SET lt.message = JSON_REPLACE(lt.message, '$.data.username', u.username) -WHERE - lt.ident IN ('rest.logger.db', 'controller.log') - AND lt.priority = 6; // /* backfill for removing the extra escaping for the other ident types */ UPDATE mod_logger.log_table lt