diff --git a/TSG-21.03/Clickhouse/add_column.txt b/TSG-21.03/Clickhouse/add_column.sql similarity index 74% rename from TSG-21.03/Clickhouse/add_column.txt rename to TSG-21.03/Clickhouse/add_column.sql index e274af0..f5c2381 100644 --- a/TSG-21.03/Clickhouse/add_column.txt +++ b/TSG-21.03/Clickhouse/add_column.sql @@ -114,116 +114,78 @@ ALTER TABLE security_event_log ON CLUSTER ck_cluster ADD COLUMN IF NOT EXISTS rt -ALTER TABLE connection_record_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_call_id String after app_extra_info; ALTER TABLE connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_call_id String after app_extra_info; -ALTER TABLE security_event_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_call_id String after app_extra_info; ALTER TABLE security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_call_id String after app_extra_info; -ALTER TABLE connection_record_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_from String after sip_call_id; ALTER TABLE connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_from String after sip_call_id; -ALTER TABLE security_event_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_from String after sip_call_id; ALTER TABLE security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_from String after sip_call_id; -ALTER TABLE connection_record_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_to String after sip_from; ALTER TABLE connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_to String after sip_from; -ALTER TABLE security_event_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_to String after sip_from; ALTER TABLE security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_to String after sip_from; -ALTER TABLE connection_record_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_user_agent String after sip_to; ALTER TABLE connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_user_agent String after sip_to; -ALTER TABLE security_event_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_user_agent String after sip_to; ALTER TABLE security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_user_agent String after sip_to; -ALTER TABLE connection_record_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_server String after sip_user_agent; ALTER TABLE connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_server String after sip_user_agent; -ALTER TABLE security_event_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_server String after sip_user_agent; ALTER TABLE security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_server String after sip_user_agent; -ALTER TABLE connection_record_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_from_sdp_connect_ip String after sip_server; ALTER TABLE connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_from_sdp_connect_ip String after sip_server; -ALTER TABLE security_event_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_from_sdp_connect_ip String after sip_server; ALTER TABLE security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_from_sdp_connect_ip String after sip_server; -ALTER TABLE connection_record_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_from_sdp_media_port Int64 after sip_from_sdp_connect_ip; ALTER TABLE connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_from_sdp_media_port Int64 after sip_from_sdp_connect_ip; -ALTER TABLE security_event_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_from_sdp_media_port Int64 after sip_from_sdp_connect_ip; ALTER TABLE security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_from_sdp_media_port Int64 after sip_from_sdp_connect_ip; -ALTER TABLE connection_record_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_from_sdp_media_type String after sip_from_sdp_media_port; ALTER TABLE connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_from_sdp_media_type String after sip_from_sdp_media_port; -ALTER TABLE security_event_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_from_sdp_media_type String after sip_from_sdp_media_port; ALTER TABLE security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_from_sdp_media_type String after sip_from_sdp_media_port; -ALTER TABLE connection_record_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_from_sdp_content String after sip_from_sdp_media_type; ALTER TABLE connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_from_sdp_content String after sip_from_sdp_media_type; -ALTER TABLE security_event_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_from_sdp_content String after sip_from_sdp_media_type; ALTER TABLE security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_from_sdp_content String after sip_from_sdp_media_type; -ALTER TABLE connection_record_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_to_sdp_connect_ip String after sip_from_sdp_content; ALTER TABLE connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_to_sdp_connect_ip String after sip_from_sdp_content; -ALTER TABLE security_event_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_to_sdp_connect_ip String after sip_from_sdp_content; ALTER TABLE security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_to_sdp_connect_ip String after sip_from_sdp_content; -ALTER TABLE connection_record_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_to_sdp_media_port Int64 after sip_to_sdp_connect_ip; ALTER TABLE connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_to_sdp_media_port Int64 after sip_to_sdp_connect_ip; -ALTER TABLE security_event_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_to_sdp_media_port Int64 after sip_to_sdp_connect_ip; ALTER TABLE security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_to_sdp_media_port Int64 after sip_to_sdp_connect_ip; -ALTER TABLE connection_record_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_to_sdp_media_type String after sip_to_sdp_media_port; ALTER TABLE connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_to_sdp_media_type String after sip_to_sdp_media_port; -ALTER TABLE security_event_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_to_sdp_media_type String after sip_to_sdp_media_port; ALTER TABLE security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_to_sdp_media_type String after sip_to_sdp_media_port; -ALTER TABLE connection_record_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_to_sdp_content String after sip_to_sdp_media_type; ALTER TABLE connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_to_sdp_content String after sip_to_sdp_media_type; -ALTER TABLE security_event_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_to_sdp_content String after sip_to_sdp_media_type; ALTER TABLE security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_to_sdp_content String after sip_to_sdp_media_type; -ALTER TABLE connection_record_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_duration Int64 after sip_to_sdp_content; ALTER TABLE connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_duration Int64 after sip_to_sdp_content; -ALTER TABLE security_event_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_duration Int64 after sip_to_sdp_content; ALTER TABLE security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_duration Int64 after sip_to_sdp_content; -ALTER TABLE connection_record_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_bye String after sip_duration; ALTER TABLE connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_bye String after sip_duration; -ALTER TABLE security_event_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_bye String after sip_duration; ALTER TABLE security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS sip_bye String after sip_duration; -ALTER TABLE connection_record_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS rtp_payload_type_c2s Nullable(Int64) after sip_bye; ALTER TABLE connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS rtp_payload_type_c2s Nullable(Int64) after sip_bye; -ALTER TABLE security_event_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS rtp_payload_type_c2s Nullable(Int64) after sip_bye; ALTER TABLE security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS rtp_payload_type_c2s Nullable(Int64) after sip_bye; -ALTER TABLE connection_record_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS rtp_payload_type_s2c Nullable(Int64) after rtp_payload_type_c2s; ALTER TABLE connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS rtp_payload_type_s2c Nullable(Int64) after rtp_payload_type_c2s; -ALTER TABLE security_event_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS rtp_payload_type_s2c Nullable(Int64) after rtp_payload_type_c2s; ALTER TABLE security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS rtp_payload_type_s2c Nullable(Int64) after rtp_payload_type_c2s; -ALTER TABLE connection_record_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS rtp_pcap_dir_c2s String after rtp_payload_type_s2c; ALTER TABLE connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS rtp_pcap_dir_c2s String after rtp_payload_type_s2c; -ALTER TABLE security_event_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS rtp_pcap_dir_c2s String after rtp_payload_type_s2c; ALTER TABLE security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS rtp_pcap_dir_c2s String after rtp_payload_type_s2c; -ALTER TABLE connection_record_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS rtp_pcap_dir_s2c String after rtp_pcap_dir_c2s; ALTER TABLE connection_record_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS rtp_pcap_dir_s2c String after rtp_pcap_dir_c2s; -ALTER TABLE security_event_log_local ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS rtp_pcap_dir_s2c String after rtp_pcap_dir_c2s; ALTER TABLE security_event_log ON CLUSTER ck_query ADD COLUMN IF NOT EXISTS rtp_pcap_dir_s2c String after rtp_pcap_dir_c2s; \ No newline at end of file