diff --git a/TSG-21.07/clickhouse/active_defence_event_log.sql b/TSG-21.07/clickhouse/active_defence_event_log.sql new file mode 100644 index 0000000..ec15ff8 --- /dev/null +++ b/TSG-21.07/clickhouse/active_defence_event_log.sql @@ -0,0 +1,13 @@ +--------https://jira.geedge.net/browse/TSG-6878 +ALTER TABLE tsg_galaxy_v3.active_defence_event_log ON CLUSTER ck_cluster DROP COLUMN IF EXISTS common_link_id; +ALTER TABLE tsg_galaxy_v3.active_defence_event_log ON CLUSTER ck_query DROP COLUMN IF EXISTS common_link_id; +ALTER TABLE tsg_galaxy_v3.active_defence_event_log_local ON CLUSTER ck_cluster DROP COLUMN IF EXISTS common_link_id; + +ALTER TABLE tsg_galaxy_v3.active_defence_event_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; +ALTER TABLE tsg_galaxy_v3.active_defence_event_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; + +ALTER TABLE tsg_galaxy_v3.active_defence_event_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; +ALTER TABLE tsg_galaxy_v3.active_defence_event_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; + +ALTER TABLE tsg_galaxy_v3.active_defence_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; +ALTER TABLE tsg_galaxy_v3.active_defence_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; diff --git a/TSG-21.07/clickhouse/connection_record_log.sql b/TSG-21.07/clickhouse/connection_record_log.sql new file mode 100644 index 0000000..35ccdec --- /dev/null +++ b/TSG-21.07/clickhouse/connection_record_log.sql @@ -0,0 +1,30 @@ +--------https://jira.geedge.net/browse/TSG-6878 +ALTER TABLE tsg_galaxy_v3.connection_record_log ON CLUSTER ck_cluster DROP COLUMN IF EXISTS common_link_id; +ALTER TABLE tsg_galaxy_v3.connection_record_log ON CLUSTER ck_query DROP COLUMN IF EXISTS common_link_id; +ALTER TABLE tsg_galaxy_v3.connection_record_log_local ON CLUSTER ck_cluster DROP COLUMN IF EXISTS common_link_id; + +ALTER TABLE tsg_galaxy_v3.connection_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; +ALTER TABLE tsg_galaxy_v3.connection_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; + +ALTER TABLE tsg_galaxy_v3.connection_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; +ALTER TABLE tsg_galaxy_v3.connection_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; + +ALTER TABLE tsg_galaxy_v3.connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; +ALTER TABLE tsg_galaxy_v3.connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; + +--------https://jira.geedge.net/browse/TSG-6878 + +ALTER TABLE tsg_galaxy_v3.connection_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; +ALTER TABLE tsg_galaxy_v3.connection_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; + +ALTER TABLE tsg_galaxy_v3.connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; + +--------https://jira.geedge.net/browse/TSG-6957 +ALTER TABLE tsg_galaxy_v3.connection_record_log ON CLUSTER ck_cluster DROP COLUMN IF EXISTS http_response_lantency_ms; +ALTER TABLE tsg_galaxy_v3.connection_record_log ON CLUSTER ck_query DROP COLUMN IF EXISTS http_response_lantency_ms; +ALTER TABLE tsg_galaxy_v3.connection_record_log_local ON CLUSTER ck_cluster DROP COLUMN IF EXISTS http_response_lantency_ms; + +ALTER TABLE tsg_galaxy_v3.connection_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS http_response_latency_ms Int64 after http_version; +ALTER TABLE tsg_galaxy_v3.connection_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS http_response_latency_ms Int64 after http_version; + +ALTER TABLE tsg_galaxy_v3.connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS http_response_latency_ms Int64 after http_version; \ No newline at end of file diff --git a/TSG-21.07/clickhouse/gtpc_record_log.sql b/TSG-21.07/clickhouse/gtpc_record_log.sql new file mode 100644 index 0000000..2806300 --- /dev/null +++ b/TSG-21.07/clickhouse/gtpc_record_log.sql @@ -0,0 +1,20 @@ +--------https://jira.geedge.net/browse/TSG-6878 +ALTER TABLE tsg_galaxy_v3.gtpc_record_log ON CLUSTER ck_cluster DROP COLUMN IF EXISTS common_link_id; +ALTER TABLE tsg_galaxy_v3.gtpc_record_log ON CLUSTER ck_query DROP COLUMN IF EXISTS common_link_id; +ALTER TABLE tsg_galaxy_v3.gtpc_record_log_local ON CLUSTER ck_cluster DROP COLUMN IF EXISTS common_link_id; + +ALTER TABLE tsg_galaxy_v3.gtpc_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; +ALTER TABLE tsg_galaxy_v3.gtpc_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; + +ALTER TABLE tsg_galaxy_v3.gtpc_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; +ALTER TABLE tsg_galaxy_v3.gtpc_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; + +ALTER TABLE tsg_galaxy_v3.gtpc_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; +ALTER TABLE tsg_galaxy_v3.gtpc_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; + +--------https://jira.geedge.net/browse/TSG-6878 + +ALTER TABLE tsg_galaxy_v3.gtpc_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; +ALTER TABLE tsg_galaxy_v3.gtpc_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; + +ALTER TABLE tsg_galaxy_v3.gtpc_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; \ No newline at end of file diff --git a/TSG-21.07/clickhouse/live_session_record_log.sql b/TSG-21.07/clickhouse/live_session_record_log.sql new file mode 100644 index 0000000..bae9535 --- /dev/null +++ b/TSG-21.07/clickhouse/live_session_record_log.sql @@ -0,0 +1,30 @@ +--------https://jira.geedge.net/browse/TSG-6878 +ALTER TABLE tsg_galaxy_v3.live_session_record_log ON CLUSTER ck_cluster DROP COLUMN IF EXISTS common_link_id; +ALTER TABLE tsg_galaxy_v3.live_session_record_log ON CLUSTER ck_query DROP COLUMN IF EXISTS common_link_id; +ALTER TABLE tsg_galaxy_v3.live_session_record_log_local ON CLUSTER ck_cluster DROP COLUMN IF EXISTS common_link_id; + +ALTER TABLE tsg_galaxy_v3.live_session_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; +ALTER TABLE tsg_galaxy_v3.live_session_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; + +ALTER TABLE tsg_galaxy_v3.live_session_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; +ALTER TABLE tsg_galaxy_v3.live_session_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; + +ALTER TABLE tsg_galaxy_v3.live_session_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; +ALTER TABLE tsg_galaxy_v3.live_session_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; + +--------https://jira.geedge.net/browse/TSG-6878 + +ALTER TABLE tsg_galaxy_v3.live_session_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; +ALTER TABLE tsg_galaxy_v3.live_session_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; + +ALTER TABLE tsg_galaxy_v3.live_session_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; + +--------https://jira.geedge.net/browse/TSG-6957 +ALTER TABLE tsg_galaxy_v3.live_session_record_log ON CLUSTER ck_cluster DROP COLUMN IF EXISTS http_response_lantency_ms; +ALTER TABLE tsg_galaxy_v3.live_session_record_log ON CLUSTER ck_query DROP COLUMN IF EXISTS http_response_lantency_ms; +ALTER TABLE tsg_galaxy_v3.live_session_record_log_local ON CLUSTER ck_cluster DROP COLUMN IF EXISTS http_response_lantency_ms; + +ALTER TABLE tsg_galaxy_v3.live_session_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS http_response_latency_ms Int64 after http_version; +ALTER TABLE tsg_galaxy_v3.live_session_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS http_response_latency_ms Int64 after http_version; + +ALTER TABLE tsg_galaxy_v3.live_session_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS http_response_latency_ms Int64 after http_version; \ No newline at end of file diff --git a/TSG-21.07/clickhouse/proxy_event_log.sql b/TSG-21.07/clickhouse/proxy_event_log.sql new file mode 100644 index 0000000..e42758e --- /dev/null +++ b/TSG-21.07/clickhouse/proxy_event_log.sql @@ -0,0 +1,31 @@ +--------https://jira.geedge.net/browse/TSG-6945 +ALTER TABLE tsg_galaxy_v3.proxy_event_log ON CLUSTER ck_cluster DROP COLUMN IF EXISTS common_link_id; +ALTER TABLE tsg_galaxy_v3.proxy_event_log ON CLUSTER ck_query DROP COLUMN IF EXISTS common_link_id; +ALTER TABLE tsg_galaxy_v3.proxy_event_log_local ON CLUSTER ck_cluster DROP COLUMN IF EXISTS common_link_id; + +ALTER TABLE tsg_galaxy_v3.proxy_event_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; +ALTER TABLE tsg_galaxy_v3.proxy_event_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; + +ALTER TABLE tsg_galaxy_v3.proxy_event_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; +ALTER TABLE tsg_galaxy_v3.proxy_event_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; + +ALTER TABLE tsg_galaxy_v3.proxy_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; +ALTER TABLE tsg_galaxy_v3.proxy_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; + +--------https://jira.geedge.net/browse/TSG-6878 + +ALTER TABLE tsg_galaxy_v3.proxy_event_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; +ALTER TABLE tsg_galaxy_v3.proxy_event_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; + +ALTER TABLE tsg_galaxy_v3.proxy_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; + + +--------https://jira.geedge.net/browse/TSG-6957 +ALTER TABLE tsg_galaxy_v3.proxy_event_log ON CLUSTER ck_cluster DROP COLUMN IF EXISTS http_response_lantency_ms; +ALTER TABLE tsg_galaxy_v3.proxy_event_log ON CLUSTER ck_query DROP COLUMN IF EXISTS http_response_lantency_ms; +ALTER TABLE tsg_galaxy_v3.proxy_event_log_local ON CLUSTER ck_cluster DROP COLUMN IF EXISTS http_response_lantency_ms; + +ALTER TABLE tsg_galaxy_v3.proxy_event_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS http_response_latency_ms Int64 after http_version; +ALTER TABLE tsg_galaxy_v3.proxy_event_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS http_response_latency_ms Int64 after http_version; + +ALTER TABLE tsg_galaxy_v3.proxy_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS http_response_latency_ms Int64 after http_version; \ No newline at end of file diff --git a/TSG-21.07/clickhouse/radius_record_log.sql b/TSG-21.07/clickhouse/radius_record_log.sql new file mode 100644 index 0000000..7173738 --- /dev/null +++ b/TSG-21.07/clickhouse/radius_record_log.sql @@ -0,0 +1,20 @@ +--------https://jira.geedge.net/browse/TSG-6878 +ALTER TABLE tsg_galaxy_v3.radius_record_log ON CLUSTER ck_cluster DROP COLUMN IF EXISTS common_link_id; +ALTER TABLE tsg_galaxy_v3.radius_record_log ON CLUSTER ck_query DROP COLUMN IF EXISTS common_link_id; +ALTER TABLE tsg_galaxy_v3.radius_record_log_local ON CLUSTER ck_cluster DROP COLUMN IF EXISTS common_link_id; + +ALTER TABLE tsg_galaxy_v3.radius_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; +ALTER TABLE tsg_galaxy_v3.radius_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; + +ALTER TABLE tsg_galaxy_v3.radius_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; +ALTER TABLE tsg_galaxy_v3.radius_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; + +ALTER TABLE tsg_galaxy_v3.radius_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; +ALTER TABLE tsg_galaxy_v3.radius_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; + +--------https://jira.geedge.net/browse/TSG-6878 + +ALTER TABLE tsg_galaxy_v3.radius_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; +ALTER TABLE tsg_galaxy_v3.radius_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; + +ALTER TABLE tsg_galaxy_v3.radius_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; \ No newline at end of file diff --git a/TSG-21.07/clickhouse/security_event_log.sql b/TSG-21.07/clickhouse/security_event_log.sql new file mode 100644 index 0000000..5c8d2a9 --- /dev/null +++ b/TSG-21.07/clickhouse/security_event_log.sql @@ -0,0 +1,30 @@ +--------https://jira.geedge.net/browse/TSG-6878 +ALTER TABLE tsg_galaxy_v3.security_event_log ON CLUSTER ck_cluster DROP COLUMN IF EXISTS common_link_id; +ALTER TABLE tsg_galaxy_v3.security_event_log ON CLUSTER ck_query DROP COLUMN IF EXISTS common_link_id; +ALTER TABLE tsg_galaxy_v3.security_event_log_local ON CLUSTER ck_cluster DROP COLUMN IF EXISTS common_link_id; + +ALTER TABLE tsg_galaxy_v3.security_event_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; +ALTER TABLE tsg_galaxy_v3.security_event_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; + +ALTER TABLE tsg_galaxy_v3.security_event_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; +ALTER TABLE tsg_galaxy_v3.security_event_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; + +ALTER TABLE tsg_galaxy_v3.security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; +ALTER TABLE tsg_galaxy_v3.security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; + +--------https://jira.geedge.net/browse/TSG-6878 + +ALTER TABLE tsg_galaxy_v3.security_event_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; +ALTER TABLE tsg_galaxy_v3.security_event_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; + +ALTER TABLE tsg_galaxy_v3.security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; + +--------https://jira.geedge.net/browse/TSG-6957 +ALTER TABLE tsg_galaxy_v3.security_event_log ON CLUSTER ck_cluster DROP COLUMN IF EXISTS http_response_lantency_ms; +ALTER TABLE tsg_galaxy_v3.security_event_log ON CLUSTER ck_query DROP COLUMN IF EXISTS http_response_lantency_ms; +ALTER TABLE tsg_galaxy_v3.security_event_log_local ON CLUSTER ck_cluster DROP COLUMN IF EXISTS http_response_lantency_ms; + +ALTER TABLE tsg_galaxy_v3.security_event_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS http_response_latency_ms Int64 after http_version; +ALTER TABLE tsg_galaxy_v3.security_event_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS http_response_latency_ms Int64 after http_version; + +ALTER TABLE tsg_galaxy_v3.security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS http_response_latency_ms Int64 after http_version; \ No newline at end of file diff --git a/TSG-21.07/clickhouse/sys_packet_capture_log.sql b/TSG-21.07/clickhouse/sys_packet_capture_log.sql new file mode 100644 index 0000000..9c57f4d --- /dev/null +++ b/TSG-21.07/clickhouse/sys_packet_capture_log.sql @@ -0,0 +1,20 @@ +--------https://jira.geedge.net/browse/TSG-6878 +ALTER TABLE tsg_galaxy_v3.sys_packet_capture_log ON CLUSTER ck_cluster DROP COLUMN IF EXISTS common_link_id; +ALTER TABLE tsg_galaxy_v3.sys_packet_capture_log ON CLUSTER ck_query DROP COLUMN IF EXISTS common_link_id; +ALTER TABLE tsg_galaxy_v3.sys_packet_capture_log_local ON CLUSTER ck_cluster DROP COLUMN IF EXISTS common_link_id; + +ALTER TABLE tsg_galaxy_v3.sys_packet_capture_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; +ALTER TABLE tsg_galaxy_v3.sys_packet_capture_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; + +ALTER TABLE tsg_galaxy_v3.sys_packet_capture_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; +ALTER TABLE tsg_galaxy_v3.sys_packet_capture_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; + +ALTER TABLE tsg_galaxy_v3.sys_packet_capture_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; +ALTER TABLE tsg_galaxy_v3.sys_packet_capture_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; + +--------https://jira.geedge.net/browse/TSG-6878 + +ALTER TABLE tsg_galaxy_v3.sys_packet_capture_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; +ALTER TABLE tsg_galaxy_v3.sys_packet_capture_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; + +ALTER TABLE tsg_galaxy_v3.sys_packet_capture_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; \ No newline at end of file diff --git a/TSG-21.07/clickhouse/transaction_record_log.sql b/TSG-21.07/clickhouse/transaction_record_log.sql new file mode 100644 index 0000000..bf7fef5 --- /dev/null +++ b/TSG-21.07/clickhouse/transaction_record_log.sql @@ -0,0 +1,30 @@ +--------https://jira.geedge.net/browse/TSG-6878 +ALTER TABLE tsg_galaxy_v3.transaction_record_log ON CLUSTER ck_cluster DROP COLUMN IF EXISTS common_link_id; +ALTER TABLE tsg_galaxy_v3.transaction_record_log ON CLUSTER ck_query DROP COLUMN IF EXISTS common_link_id; +ALTER TABLE tsg_galaxy_v3.transaction_record_log_local ON CLUSTER ck_cluster DROP COLUMN IF EXISTS common_link_id; + +ALTER TABLE tsg_galaxy_v3.transaction_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; +ALTER TABLE tsg_galaxy_v3.transaction_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; + +ALTER TABLE tsg_galaxy_v3.transaction_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; +ALTER TABLE tsg_galaxy_v3.transaction_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; + +ALTER TABLE tsg_galaxy_v3.transaction_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; +ALTER TABLE tsg_galaxy_v3.transaction_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; + +--------https://jira.geedge.net/browse/TSG-6878 + +ALTER TABLE tsg_galaxy_v3.transaction_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; +ALTER TABLE tsg_galaxy_v3.transaction_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; + +ALTER TABLE tsg_galaxy_v3.transaction_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; + +--------https://jira.geedge.net/browse/TSG-6957 +ALTER TABLE tsg_galaxy_v3.transaction_record_log ON CLUSTER ck_cluster DROP COLUMN IF EXISTS http_response_lantency_ms; +ALTER TABLE tsg_galaxy_v3.transaction_record_log ON CLUSTER ck_query DROP COLUMN IF EXISTS http_response_lantency_ms; +ALTER TABLE tsg_galaxy_v3.transaction_record_log_local ON CLUSTER ck_cluster DROP COLUMN IF EXISTS http_response_lantency_ms; + +ALTER TABLE tsg_galaxy_v3.transaction_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS http_response_latency_ms Int64 after http_version; +ALTER TABLE tsg_galaxy_v3.transaction_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS http_response_latency_ms Int64 after http_version; + +ALTER TABLE tsg_galaxy_v3.transaction_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS http_response_latency_ms Int64 after http_version; \ No newline at end of file diff --git a/TSG-21.07/clickhouse/voip_record_log.sql b/TSG-21.07/clickhouse/voip_record_log.sql new file mode 100644 index 0000000..d858e51 --- /dev/null +++ b/TSG-21.07/clickhouse/voip_record_log.sql @@ -0,0 +1,20 @@ +--------https://jira.geedge.net/browse/TSG-6878 +ALTER TABLE tsg_galaxy_v3.voip_record_log ON CLUSTER ck_cluster DROP COLUMN IF EXISTS common_link_id; +ALTER TABLE tsg_galaxy_v3.voip_record_log ON CLUSTER ck_query DROP COLUMN IF EXISTS common_link_id; +ALTER TABLE tsg_galaxy_v3.voip_record_log_local ON CLUSTER ck_cluster DROP COLUMN IF EXISTS common_link_id; + +ALTER TABLE tsg_galaxy_v3.voip_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; +ALTER TABLE tsg_galaxy_v3.voip_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; + +ALTER TABLE tsg_galaxy_v3.voip_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; +ALTER TABLE tsg_galaxy_v3.voip_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; + +ALTER TABLE tsg_galaxy_v3.voip_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_egress_link_id Nullable(Int64) after common_device_id; +ALTER TABLE tsg_galaxy_v3.voip_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_ingress_link_id Nullable(Int64) after common_egress_link_id; + +--------https://jira.geedge.net/browse/TSG-6878 + +ALTER TABLE tsg_galaxy_v3.voip_record_log_local ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; +ALTER TABLE tsg_galaxy_v3.voip_record_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; + +ALTER TABLE tsg_galaxy_v3.voip_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS common_userdefine_app_name String after common_app_id; \ No newline at end of file