general分支清理数据sql增加自增id的初始化;

ntc_db初始化app_topic_domain_cfg配置,配置Id从1开始
This commit is contained in:
段冬梅
2019-07-09 13:36:04 +08:00
parent 47b9fdbaae
commit 011533528e
2 changed files with 132 additions and 81 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,101 +1,163 @@
DELETE FROM app_byte_cfg;
alter table app_byte_cfg auto_increment= 1;
DELETE FROM app_domain_cfg;
alter table app_domain_cfg auto_increment= 1;
DELETE FROM app_features_index;
alter table app_features_index auto_increment= 1;
DELETE FROM app_feature_index;
alter table app_feature_index auto_increment= 1;
DELETE FROM app_http_cfg;
alter table app_http_cfg auto_increment= 1;
DELETE FROM app_id_cfg;
alter table app_id_cfg auto_increment= 1;
DELETE FROM app_ip_cfg;
alter table app_ip_cfg auto_increment= 1;
DELETE FROM app_policy_cfg;
alter table app_policy_cfg auto_increment= 1;
DELETE FROM area_ip_cfg;
alter table area_ip_cfg auto_increment= 1;
DELETE FROM app_layer_header_cfg;
alter table app_layer_header_cfg auto_increment= 1;
DELETE FROM app_policy_cfg;
alter table app_policy_cfg auto_increment= 1;
DELETE FROM app_session_cfg;
alter table app_session_cfg auto_increment= 1;
DELETE FROM app_ssl_cert_cfg;
DELETE FROM app_topic_domain_cfg;
alter table app_ssl_cert_cfg auto_increment= 1;
#DELETE FROM app_topic_domain_cfg where is_valid !=-1;
#update app_topic_domain_cfg set is_valid=0,is_audit=0;
DELETE FROM area_ip_cfg;
alter table area_ip_cfg auto_increment= 1;
DELETE FROM asn_ip_cfg;
alter table asn_ip_cfg auto_increment= 1;
DELETE FROM asn_keyword_cfg;
alter table asn_keyword_cfg auto_increment= 1;
DELETE FROM av_cont_ip_cfg;
alter table av_cont_ip_cfg auto_increment= 1;
DELETE FROM av_cont_url_cfg;
alter table av_cont_url_cfg auto_increment= 1;
DELETE FROM av_file_sample_cfg;
alter table av_file_sample_cfg auto_increment= 1;
DELETE FROM av_pic_ip_cfg;
alter table av_pic_ip_cfg auto_increment= 1;
DELETE FROM av_pic_url_cfg;
alter table av_pic_url_cfg auto_increment= 1;
DELETE FROM av_voip_account_cfg;
alter table av_voip_account_cfg auto_increment= 1;
DELETE FROM av_voip_ip_cfg;
alter table av_voip_ip_cfg auto_increment= 1;
DELETE FROM byte_features_cfg;
alter table byte_features_cfg auto_increment= 1;
DELETE FROM cfg_index_info;
alter table cfg_index_info auto_increment= 1;
DELETE FROM av_sign_sample_cfg;
alter table av_sign_sample_cfg auto_increment= 1;
DELETE FROM complex_keyword_cfg;
alter table complex_keyword_cfg auto_increment= 1;
DELETE FROM config_group_info;
alter table config_group_info auto_increment= 1;
DELETE FROM ddos_ip_cfg;
alter table ddos_ip_cfg auto_increment= 1;
DELETE FROM dns_domain_cfg;
alter table dns_domain_cfg auto_increment= 1;
DELETE FROM dns_ip_cfg;
alter table dns_ip_cfg auto_increment= 1;
DELETE FROM dns_res_strategy;
ALTER TABLE dns_res_strategy auto_increment = 101;
DELETE FROM file_digest_cfg;
alter table file_digest_cfg auto_increment= 1;
DELETE FROM ftp_keyword_cfg;
alter table ftp_keyword_cfg auto_increment= 1;
DELETE FROM http_body_cfg;
alter table http_body_cfg auto_increment= 1;
DELETE FROM http_req_head_cfg;
alter table http_req_head_cfg auto_increment= 1;
DELETE FROM http_res_head_cfg;
alter table http_res_head_cfg auto_increment= 1;
DELETE FROM http_url_cfg;
alter table http_url_cfg auto_increment= 1;
DELETE FROM ip_multiplex_pool_cfg;
alter table ip_multiplex_pool_cfg auto_increment= 1;
DELETE FROM ip_port_cfg;
alter table ip_port_cfg auto_increment= 1;
DELETE FROM l2tp_url_cfg;
alter table l2tp_url_cfg auto_increment= 1;
DELETE FROM mail_keyword_cfg;
alter table mail_keyword_cfg auto_increment= 1;
DELETE FROM multiple_cfg_relation;
alter table multiple_cfg_relation auto_increment= 1;
DELETE FROM ntc_bgp_as_cfg;
alter table ntc_bgp_as_cfg auto_increment= 1;
DELETE FROM ntc_subscribe_id_cfg;
alter table ntc_subscribe_id_cfg auto_increment= 1;
DELETE FROM num_boundary_cfg;
alter table num_boundary_cfg auto_increment= 1;
DELETE FROM p2p_hash_cfg;
alter table p2p_hash_cfg auto_increment= 1;
DELETE FROM p2p_keyword_cfg;
alter table p2p_keyword_cfg auto_increment= 1;
DELETE FROM policy_group_info;
ALTER TABLE policy_group_info auto_increment = 101;
DELETE FROM pptp_url_cfg;
alter table pptp_url_cfg auto_increment= 1;
DELETE FROM proxy_file_strategy_cfg;
alter table proxy_file_strategy_cfg auto_increment= 1;
DELETE FROM ssl_keyword_cfg;
alter table ssl_keyword_cfg auto_increment= 1;
DELETE FROM pxy_obj_keyring;
alter table pxy_obj_keyring auto_increment= 1;
DELETE FROM intercept_pkt_bin;
alter table intercept_pkt_bin auto_increment= 1;
DELETE FROM app_feature_index;
alter table app_feature_index auto_increment= 1;
DELETE FROM app_complex_feature_cfg;
alter table app_complex_feature_cfg auto_increment= 1;
DELETE FROM app_ip_range_cfg;
alter table app_ip_range_cfg auto_increment= 1;
DELETE FROM app_string_feature_cfg;
alter table app_string_feature_cfg auto_increment= 1;
DELETE FROM pxy_obj_trusted_ca_crl;
alter table pxy_obj_trusted_ca_crl auto_increment= 1;
DELETE FROM pxy_obj_trusted_ca_cert;
alter table pxy_obj_trusted_ca_cert auto_increment= 1;
UPDATE specific_service_cfg SET group_id=0;
DELETE FROM ip_reuse_addr_pool;
alter table ip_reuse_addr_pool auto_increment= 1;
DELETE FROM ip_reuse_ip_cfg;
alter table ip_reuse_ip_cfg auto_increment= 1;
DELETE FROM ip_reuse_policy_cfg;
alter table ip_reuse_policy_cfg auto_increment= 1;
DELETE FROM user_manage;
alter table user_manage auto_increment= 1;
#clear vpn
DELETE FROM service_dict_info where item_type='5';
#<23><><EFBFBD><EFBFBD>DNS<4E><53><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><D2B2>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>100<30><30><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><D4B2>Է<EFBFBD><D4B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>101<30><31>ʼ
ALTER TABLE policy_group_info auto_increment = 101;
#<23><><EFBFBD>asn<73>ŷ<EFBFBD><C5B7><EFBFBD><EFBFBD>
DELETE FROM asn_group_info;
<>϶<EFBFBD>̬IP<49><50>ַ<EFBFBD><D6B7>
alter table asn_group_info auto_increment= 1;
INSERT INTO `ip_reuse_addr_pool` (`cfg_id`, `addr_pool_name`, `ip_total`, `action`, `is_valid`, `is_audit`, `cfg_region_code`, `cfg_type`, `function_id`, `service_id`, `compile_id`, `is_area_effective`, `area_effective_ids`, `request_id`, `classify`, `attribute`, `lable`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `auditor_id`, `audit_time`, `description`, `cancel_request_id`, `user_region1`, `user_region2`, `user_region3`, `user_region4`, `user_region5`) VALUES ('0', 'dynamic_pool', '1', '96', '1', '1', '1', 'IR_STATIC_NOMINEE_IP', '633', '834', '0', '0', '', '0', '0', '0', '0', '0', '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', NULL, '', '', '', '', '');
UPDATE ip_reuse_addr_pool set cfg_id=0 where addr_pool_name= 'dynamic_pool';
DELETE FROM sys_log;
alter table sys_log auto_increment= 1;
DELETE FROM sys_cfg_operation_log;
DELETE FROM sys_cfg_operation_log;
alter table sys_cfg_operation_log auto_increment= 1;
DELETE FROM proc_exec_log;
alter table proc_exec_log auto_increment= 1;
DELETE FROM cfg_num_statistics;
alter table cfg_num_statistics auto_increment= 1;
DELETE FROM request_num_statistics;
alter table request_num_statistics auto_increment= 1;
DELETE FROM common_keyword_cfg;
alter table common_keyword_cfg auto_increment= 1;
DELETE FROM pxy_obj_spoofing_ip_pool;
alter table pxy_obj_spoofing_ip_pool auto_increment= 1;
DELETE FROM schedule_cfg;
alter table schedule_cfg auto_increment= 1;
DELETE FROM schedule_exce_log;
alter table schedule_exce_log auto_increment= 1;
DELETE FROM schedule_exce_new;
alter table schedule_exce_new auto_increment= 1;
#<23><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ı<EFBFBD><C4B1>ؽ<EFBFBD>sql<71><6C><EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD><DAB8><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD>ؽ<EFBFBD><D8BD><EFBFBD>
# In your Quartz properties file, you'll need to set
# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
#
#
# By: Ron Cordell - roncordell
# I didn't see this anywhere, so I thought I'd post it here. This is the script from Quartz to create the tables in a MySQL database, modified to use INNODB instead of MYISAM.
DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;