-- Table structure for table `setupcheck`
--

CREATE TABLE `setupcheck` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `sid` varchar(40) DEFAULT NULL,
  `AWB` varchar(100) DEFAULT NULL,
  `Data` datetime DEFAULT NULL,
  `Dest` varchar(200) DEFAULT NULL,
  `NrPackages` int(11) NOT NULL,
  `TotPackages` int(11) NOT NULL,
  `GrossWeight` double DEFAULT NULL,
  `GrossWeightUM` varchar(5) DEFAULT NULL,
  `NetWeight` double DEFAULT NULL,
  `NetWeightUM` varchar(5) DEFAULT NULL,
  `WeighingID` varchar(20) DEFAULT NULL,
  `HPackage` double DEFAULT NULL,
  `WPackage` double DEFAULT NULL,
  `LPackage` double DEFAULT NULL,
  `Inbound` double DEFAULT NULL,
  `RealVolume` double DEFAULT NULL,
  `InboundVolumeSurface` double DEFAULT NULL,
  `RealVolumeSurface` double DEFAULT NULL,
  `Vettore` varchar(100) DEFAULT NULL,
  `Destinazione` varchar(100) DEFAULT NULL,
  `Stato` int(11) DEFAULT NULL,
  `Flags` int(11) DEFAULT NULL,
  `StandBy` int(11) DEFAULT NULL,
  `Congruita` int(11) DEFAULT NULL,
  `UserIns` int(11) DEFAULT NULL,
  `DataIns` datetime DEFAULT NULL,
  `UserMod` int(11) DEFAULT NULL,
  `DataMod` datetime DEFAULT NULL,
  `PalletID` int(11) DEFAULT NULL,
  `PalletHeight` int(11) DEFAULT NULL,
  `PalletWeight` int(11) DEFAULT NULL,
  `PalletDescr` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `AWB` (`AWB`),
  KEY `Data` (`Data`),
  KEY `DataIns` (`DataIns`),
  KEY `DataMod` (`DataMod`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `setupcheck`
--


--
-- Table structure for table `setupmodel`
--

CREATE TABLE `setupmodel` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `AWB` varchar(100) DEFAULT NULL,
  `Data` datetime DEFAULT NULL,
  `Dest` varchar(200) DEFAULT NULL,
  `NrPackages` int(11) DEFAULT NULL,
  `TotPackages` int(11) DEFAULT NULL,
  `GrossWeight` double DEFAULT NULL,
  `NetWeight` double DEFAULT NULL,
  `HPackage` double DEFAULT NULL,
  `WPackage` double DEFAULT NULL,
  `LPackage` double DEFAULT NULL,
  `Volume` double DEFAULT NULL,
  `Vettore` varchar(100) DEFAULT NULL,
  `Destinazione` varchar(100) DEFAULT NULL,
  `Stato` int(11) DEFAULT NULL,
  `Flags` int(11) DEFAULT NULL,
  `DataIns` datetime DEFAULT NULL,
  `DataMod` datetime DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `AWB` (`AWB`),
  KEY `Data` (`Data`),
  KEY `DataIns` (`DataIns`),
  KEY `DataMod` (`DataMod`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `setupmodel`
--


--
-- Table structure for table `sped`
--

CREATE TABLE `sped` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sid` varchar(40) DEFAULT NULL,
  `pz` int(11) NOT NULL,
  `awb` varchar(50) NOT NULL,
  `dest` varchar(150) NOT NULL,
  `fly` varchar(50) NOT NULL,
  `pallet` varchar(50) DEFAULT NULL,
  `ptype` varchar(100) DEFAULT NULL,
  `weight` decimal(8,3) DEFAULT NULL,
  `inbound` decimal(8,3) DEFAULT NULL,
  `speddate` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sped_sid_idx` (`sid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `sped`
--

INSERT INTO `sped` VALUES (1,'{4ec62139-3479-42bf-9c9f-517ba6b12620}',7,'45w1791','New York','ABN54726','745624','GEOMETRIE',335.000,19.950,'2018-05-28 00:00:00'),(2,NULL,7,'45w1791','New York','ABN54726','745624','GEOMETRIE',335.000,19.950,'2018-05-28 00:00:00');

--
-- Table structure for table `sym_channel`
--

CREATE TABLE `sym_channel` (
  `channel_id` varchar(128) NOT NULL,
  `processing_order` int(11) NOT NULL DEFAULT '1',
  `max_batch_size` int(11) NOT NULL DEFAULT '1000',
  `max_batch_to_send` int(11) NOT NULL DEFAULT '60',
  `max_data_to_route` int(11) NOT NULL DEFAULT '100000',
  `extract_period_millis` int(11) NOT NULL DEFAULT '0',
  `enabled` smallint(6) NOT NULL DEFAULT '1',
  `use_old_data_to_route` smallint(6) NOT NULL DEFAULT '1',
  `use_row_data_to_route` smallint(6) NOT NULL DEFAULT '1',
  `use_pk_data_to_route` smallint(6) NOT NULL DEFAULT '1',
  `reload_flag` smallint(6) NOT NULL DEFAULT '0',
  `file_sync_flag` smallint(6) NOT NULL DEFAULT '0',
  `contains_big_lob` smallint(6) NOT NULL DEFAULT '0',
  `batch_algorithm` varchar(50) NOT NULL DEFAULT 'default',
  `data_loader_type` varchar(50) NOT NULL DEFAULT 'default',
  `description` varchar(255) DEFAULT NULL,
  `queue` varchar(25) NOT NULL DEFAULT 'default',
  `max_network_kbps` decimal(10,3) NOT NULL DEFAULT '0.000',
  `data_event_action` char(1) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `last_update_by` varchar(50) DEFAULT NULL,
  `last_update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`channel_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_channel`
--

INSERT INTO `sym_channel` VALUES ('c4rgo_transaction',1,100000,100,100000,0,1,1,1,1,0,0,0,'default','default','C4rgo Transaction','default',0.000,NULL,'2020-10-09 00:00:00',NULL,'2020-10-09 00:00:00'),('config',0,2000,100,500000,0,1,1,1,1,0,0,1,'default','default',NULL,'default',0.000,NULL,'2020-10-09 00:30:22',NULL,'2020-10-09 00:30:22'),('default',500000,1000,100,500000,0,1,1,1,1,0,0,0,'default','default',NULL,'default',0.000,NULL,'2020-10-09 00:30:22',NULL,'2020-10-09 00:30:22'),('dynamic',99999,1000,100,500000,0,1,1,1,1,0,0,0,'default','default',NULL,'default',0.000,NULL,'2020-10-09 00:30:22',NULL,'2020-10-09 00:30:22'),('heartbeat',2,100,100,500000,0,1,1,1,1,0,0,0,'default','default',NULL,'default',0.000,NULL,'2020-10-09 00:30:22',NULL,'2020-10-09 00:30:22'),('monitor',2,100,100,500000,0,1,1,1,1,0,0,1,'default','default',NULL,'default',0.000,NULL,'2020-10-09 00:30:22',NULL,'2020-10-09 00:30:22'),('reload',1,10000,100,500000,0,1,1,1,1,1,0,0,'default','default',NULL,'default',0.000,NULL,'2020-10-09 00:30:22',NULL,'2020-10-09 00:30:22');
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_I_FOR_SYM_CHNNL_C4RG after insert on `c4rg0airv2`.`sym_channel`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, row_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_channel',                                                                                                                                            
                                      'I',                                                                                                                                                             
                                      27,                                                                                                                                             
                                      concat(
          cast(if(new.`channel_id` is null,'',concat('"',replace(replace(new.`channel_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`processing_order` is null,'',concat('"',cast(new.`processing_order` as char),'"')),',',
          if(new.`max_batch_size` is null,'',concat('"',cast(new.`max_batch_size` as char),'"')),',',
          if(new.`max_batch_to_send` is null,'',concat('"',cast(new.`max_batch_to_send` as char),'"')),',',
          if(new.`max_data_to_route` is null,'',concat('"',cast(new.`max_data_to_route` as char),'"')),',',
          if(new.`extract_period_millis` is null,'',concat('"',cast(new.`extract_period_millis` as char),'"')),',',
          if(new.`enabled` is null,'',concat('"',cast(new.`enabled` as char),'"')),',',
          if(new.`use_old_data_to_route` is null,'',concat('"',cast(new.`use_old_data_to_route` as char),'"')),',',
          if(new.`use_row_data_to_route` is null,'',concat('"',cast(new.`use_row_data_to_route` as char),'"')),',',
          if(new.`use_pk_data_to_route` is null,'',concat('"',cast(new.`use_pk_data_to_route` as char),'"')),',',
          if(new.`reload_flag` is null,'',concat('"',cast(new.`reload_flag` as char),'"')),',',
          if(new.`file_sync_flag` is null,'',concat('"',cast(new.`file_sync_flag` as char),'"')),',',
          if(new.`contains_big_lob` is null,'',concat('"',cast(new.`contains_big_lob` as char),'"')),',',
          cast(if(new.`batch_algorithm` is null,'',concat('"',replace(replace(new.`batch_algorithm`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`data_loader_type` is null,'',concat('"',replace(replace(new.`data_loader_type`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`description` is null,'',concat('"',replace(replace(new.`description`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`queue` is null,'',concat('"',replace(replace(new.`queue`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`max_network_kbps` is null,'',concat('"',cast(new.`max_network_kbps` as char),'"')),',',
          cast(if(new.`data_event_action` is null,'',concat('"',replace(replace(new.`data_event_action`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"'))                                                                                                                                                
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_U_FOR_SYM_CHNNL_C4RG after update on `c4rg0airv2`.`sym_channel`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                  DECLARE var_row_data mediumtext character set utf8;                                                                                                                                      
                                  DECLARE var_old_data mediumtext character set utf8;                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                   set var_row_data = concat(
          cast(if(new.`channel_id` is null,'',concat('"',replace(replace(new.`channel_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`processing_order` is null,'',concat('"',cast(new.`processing_order` as char),'"')),',',
          if(new.`max_batch_size` is null,'',concat('"',cast(new.`max_batch_size` as char),'"')),',',
          if(new.`max_batch_to_send` is null,'',concat('"',cast(new.`max_batch_to_send` as char),'"')),',',
          if(new.`max_data_to_route` is null,'',concat('"',cast(new.`max_data_to_route` as char),'"')),',',
          if(new.`extract_period_millis` is null,'',concat('"',cast(new.`extract_period_millis` as char),'"')),',',
          if(new.`enabled` is null,'',concat('"',cast(new.`enabled` as char),'"')),',',
          if(new.`use_old_data_to_route` is null,'',concat('"',cast(new.`use_old_data_to_route` as char),'"')),',',
          if(new.`use_row_data_to_route` is null,'',concat('"',cast(new.`use_row_data_to_route` as char),'"')),',',
          if(new.`use_pk_data_to_route` is null,'',concat('"',cast(new.`use_pk_data_to_route` as char),'"')),',',
          if(new.`reload_flag` is null,'',concat('"',cast(new.`reload_flag` as char),'"')),',',
          if(new.`file_sync_flag` is null,'',concat('"',cast(new.`file_sync_flag` as char),'"')),',',
          if(new.`contains_big_lob` is null,'',concat('"',cast(new.`contains_big_lob` as char),'"')),',',
          cast(if(new.`batch_algorithm` is null,'',concat('"',replace(replace(new.`batch_algorithm`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`data_loader_type` is null,'',concat('"',replace(replace(new.`data_loader_type`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`description` is null,'',concat('"',replace(replace(new.`description`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`queue` is null,'',concat('"',replace(replace(new.`queue`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`max_network_kbps` is null,'',concat('"',cast(new.`max_network_kbps` as char),'"')),',',
          cast(if(new.`data_event_action` is null,'',concat('"',replace(replace(new.`data_event_action`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"')));                                                                                                                              
                                   set var_old_data = concat(null);                                                                                                                           
                                   if 1=1 then                                                                                                                                  
                                        insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, row_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                        values(                                                                                                                                                           
                                          'sym_channel',                                                                                                                                           
                                          'U',                                                                                                                                                            
                                          27,                                                                                                                                            
                                          concat(
          cast(if(old.`channel_id` is null,'',concat('"',replace(replace(old.`channel_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                               
                                           ),                                                                                                                                                             
                                          var_row_data,                                                                                                                                                   
                                          var_old_data,                                                                                                                                                   
                                          'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                       
                                          null,                                                                                                                                              
                                          CURRENT_TIMESTAMP                                                                                                                                               
                                        );                                                                                                                                                                
                                    end if;                                                                                                                                                               
                                  end if;                                                                                                                                                                
                                                                                                                                                                                    
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_D_FOR_SYM_CHNNL_C4RG after delete on `c4rg0airv2`.`sym_channel`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_channel',                                                                                                                                            
                                      'D',                                                                                                                                                             
                                      27,                                                                                                                                             
                                      concat(
          cast(if(old.`channel_id` is null,'',concat('"',replace(replace(old.`channel_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                                
                                       ),                                                                                                                                                              
                                       concat(null                                                                                                                                            
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;

--
-- Table structure for table `sym_conflict`
--

CREATE TABLE `sym_conflict` (
  `conflict_id` varchar(50) NOT NULL,
  `source_node_group_id` varchar(50) NOT NULL,
  `target_node_group_id` varchar(50) NOT NULL,
  `target_channel_id` varchar(128) DEFAULT NULL,
  `target_catalog_name` varchar(255) DEFAULT NULL,
  `target_schema_name` varchar(255) DEFAULT NULL,
  `target_table_name` varchar(255) DEFAULT NULL,
  `detect_type` varchar(128) NOT NULL,
  `detect_expression` mediumtext,
  `resolve_type` varchar(128) NOT NULL,
  `ping_back` varchar(128) NOT NULL,
  `resolve_changes_only` smallint(6) DEFAULT '0',
  `resolve_row_only` smallint(6) DEFAULT '0',
  `create_time` datetime NOT NULL,
  `last_update_by` varchar(50) DEFAULT NULL,
  `last_update_time` datetime NOT NULL,
  PRIMARY KEY (`conflict_id`),
  KEY `sym_fk_cf_2_grp_lnk` (`source_node_group_id`,`target_node_group_id`),
  CONSTRAINT `sym_fk_cf_2_grp_lnk` FOREIGN KEY (`source_node_group_id`, `target_node_group_id`) REFERENCES `sym_node_group_link` (`source_node_group_id`, `target_node_group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_conflict`
--

DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_I_FOR_SYM_CNFLCT_C4RG after insert on `c4rg0airv2`.`sym_conflict`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, row_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_conflict',                                                                                                                                            
                                      'I',                                                                                                                                                             
                                      25,                                                                                                                                             
                                      concat(
          cast(if(new.`conflict_id` is null,'',concat('"',replace(replace(new.`conflict_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`source_node_group_id` is null,'',concat('"',replace(replace(new.`source_node_group_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`target_node_group_id` is null,'',concat('"',replace(replace(new.`target_node_group_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`target_channel_id` is null,'',concat('"',replace(replace(new.`target_channel_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`target_catalog_name` is null,'',concat('"',replace(replace(new.`target_catalog_name`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`target_schema_name` is null,'',concat('"',replace(replace(new.`target_schema_name`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`target_table_name` is null,'',concat('"',replace(replace(new.`target_table_name`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`detect_type` is null,'',concat('"',replace(replace(new.`detect_type`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`detect_expression` is null,'',concat('"',replace(replace(new.`detect_expression`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`resolve_type` is null,'',concat('"',replace(replace(new.`resolve_type`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`ping_back` is null,'',concat('"',replace(replace(new.`ping_back`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`resolve_changes_only` is null,'',concat('"',cast(new.`resolve_changes_only` as char),'"')),',',
          if(new.`resolve_row_only` is null,'',concat('"',cast(new.`resolve_row_only` as char),'"')),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"'))                                                                                                                                                
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_U_FOR_SYM_CNFLCT_C4RG after update on `c4rg0airv2`.`sym_conflict`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                  DECLARE var_row_data mediumtext character set utf8;                                                                                                                                      
                                  DECLARE var_old_data mediumtext character set utf8;                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                   set var_row_data = concat(
          cast(if(new.`conflict_id` is null,'',concat('"',replace(replace(new.`conflict_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`source_node_group_id` is null,'',concat('"',replace(replace(new.`source_node_group_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`target_node_group_id` is null,'',concat('"',replace(replace(new.`target_node_group_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`target_channel_id` is null,'',concat('"',replace(replace(new.`target_channel_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`target_catalog_name` is null,'',concat('"',replace(replace(new.`target_catalog_name`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`target_schema_name` is null,'',concat('"',replace(replace(new.`target_schema_name`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`target_table_name` is null,'',concat('"',replace(replace(new.`target_table_name`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`detect_type` is null,'',concat('"',replace(replace(new.`detect_type`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`detect_expression` is null,'',concat('"',replace(replace(new.`detect_expression`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`resolve_type` is null,'',concat('"',replace(replace(new.`resolve_type`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`ping_back` is null,'',concat('"',replace(replace(new.`ping_back`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`resolve_changes_only` is null,'',concat('"',cast(new.`resolve_changes_only` as char),'"')),',',
          if(new.`resolve_row_only` is null,'',concat('"',cast(new.`resolve_row_only` as char),'"')),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"')));                                                                                                                              
                                   set var_old_data = concat(null);                                                                                                                           
                                   if 1=1 then                                                                                                                                  
                                        insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, row_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                        values(                                                                                                                                                           
                                          'sym_conflict',                                                                                                                                           
                                          'U',                                                                                                                                                            
                                          25,                                                                                                                                            
                                          concat(
          cast(if(old.`conflict_id` is null,'',concat('"',replace(replace(old.`conflict_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                               
                                           ),                                                                                                                                                             
                                          var_row_data,                                                                                                                                                   
                                          var_old_data,                                                                                                                                                   
                                          'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                       
                                          null,                                                                                                                                              
                                          CURRENT_TIMESTAMP                                                                                                                                               
                                        );                                                                                                                                                                
                                    end if;                                                                                                                                                               
                                  end if;                                                                                                                                                                
                                                                                                                                                                                    
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_D_FOR_SYM_CNFLCT_C4RG after delete on `c4rg0airv2`.`sym_conflict`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_conflict',                                                                                                                                            
                                      'D',                                                                                                                                                             
                                      25,                                                                                                                                             
                                      concat(
          cast(if(old.`conflict_id` is null,'',concat('"',replace(replace(old.`conflict_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                                
                                       ),                                                                                                                                                              
                                       concat(null                                                                                                                                            
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;

--
-- Table structure for table `sym_context`
--

CREATE TABLE `sym_context` (
  `name` varchar(80) NOT NULL,
  `context_value` mediumtext,
  `create_time` datetime DEFAULT NULL,
  `last_update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_context`
--

INSERT INTO `sym_context` VALUES ('guid','adf69510-4c33-4ef1-996f-7d3c0ae6c2fa','2020-10-10 03:04:57',NULL),('purge.last.batch.id','4634','2020-10-09 04:00:00','2020-11-09 20:00:00'),('purge.last.data.id','4724','2020-10-09 04:00:00','2020-11-09 20:00:00'),('purge.last.event.batch.id','4634','2020-10-09 04:00:00','2020-11-09 20:00:00');

--
-- Table structure for table `sym_data`
--

CREATE TABLE `sym_data` (
  `data_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `table_name` varchar(255) NOT NULL,
  `event_type` char(1) NOT NULL,
  `row_data` mediumtext,
  `pk_data` mediumtext,
  `old_data` mediumtext,
  `trigger_hist_id` int(11) NOT NULL,
  `channel_id` varchar(128) DEFAULT NULL,
  `transaction_id` varchar(255) DEFAULT NULL,
  `source_node_id` varchar(50) DEFAULT NULL,
  `external_data` varchar(50) DEFAULT NULL,
  `node_list` varchar(255) DEFAULT NULL,
  `is_prerouted` smallint(6) NOT NULL DEFAULT '0',
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`data_id`),
  UNIQUE KEY `sym_idx_d_channel_id` (`data_id`,`channel_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4746 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_data`
--

INSERT INTO `sym_data` VALUES (4725,'sym_node_host','U','\"001\",\"DESKTOP-8SVEEPF\",\"DESKTOP-8SVEEPF-e685a8bc-d71f-4e3b-a371-88cec8569ec5\",\"192.168.0.50\",\"HYSTOU\",\"Windows 10\",\"amd64\",\"10.0\",\"4\",\"34514224\",\"123207680\",\"1888485376\",\"1.8.0_231\",\"Oracle Corporation\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 18:03:03\",\"2020-11-05 18:29:50\",\"2020-10-09 01:47:21\"','\"001\",\"DESKTOP-8SVEEPF\"',NULL,29,'heartbeat','41005.501379','001',NULL,NULL,0,'2020-11-09 18:03:02'),(4726,'sym_node_host','U','\"000\",\"vps806731\",\"vps806731-b0a85d78-4774-49a2-afde-57b1ec6483c6\",\"217.182.66.168\",\"root\",\"Linux\",\"amd64\",\"4.15.0-101-generic\",\"4\",\"186094176\",\"265289728\",\"954728448\",\"1.8.0_265\",\"Private Build\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 18:09:48\",\"2020-10-09 03:04:57\",\"2020-10-09 01:46:34\"','\"000\",\"vps806731\"',NULL,29,'heartbeat','41012.501722',NULL,NULL,NULL,0,'2020-11-09 18:09:48'),(4727,'sym_node_host','U','\"001\",\"DESKTOP-8SVEEPF\",\"DESKTOP-8SVEEPF-e685a8bc-d71f-4e3b-a371-88cec8569ec5\",\"192.168.0.50\",\"HYSTOU\",\"Windows 10\",\"amd64\",\"10.0\",\"4\",\"51527392\",\"123207680\",\"1888485376\",\"1.8.0_231\",\"Oracle Corporation\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 18:18:04\",\"2020-11-05 18:29:50\",\"2020-10-09 01:47:21\"','\"001\",\"DESKTOP-8SVEEPF\"',NULL,29,'heartbeat','41029.502209','001',NULL,NULL,0,'2020-11-09 18:18:04'),(4728,'sym_node_host','U','\"000\",\"vps806731\",\"vps806731-b0a85d78-4774-49a2-afde-57b1ec6483c6\",\"217.182.66.168\",\"root\",\"Linux\",\"amd64\",\"4.15.0-101-generic\",\"4\",\"201613360\",\"265289728\",\"954728448\",\"1.8.0_265\",\"Private Build\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 18:24:48\",\"2020-10-09 03:04:57\",\"2020-10-09 01:46:34\"','\"000\",\"vps806731\"',NULL,29,'heartbeat','41039.502548',NULL,NULL,NULL,0,'2020-11-09 18:24:48'),(4729,'sym_node_host','U','\"001\",\"DESKTOP-8SVEEPF\",\"DESKTOP-8SVEEPF-e685a8bc-d71f-4e3b-a371-88cec8569ec5\",\"192.168.0.50\",\"HYSTOU\",\"Windows 10\",\"amd64\",\"10.0\",\"4\",\"41453184\",\"123207680\",\"1888485376\",\"1.8.0_231\",\"Oracle Corporation\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 18:33:05\",\"2020-11-05 18:29:50\",\"2020-10-09 01:47:21\"','\"001\",\"DESKTOP-8SVEEPF\"',NULL,29,'heartbeat','41057.502961','001',NULL,NULL,0,'2020-11-09 18:33:05'),(4730,'sym_node_host','U','\"000\",\"vps806731\",\"vps806731-b0a85d78-4774-49a2-afde-57b1ec6483c6\",\"217.182.66.168\",\"root\",\"Linux\",\"amd64\",\"4.15.0-101-generic\",\"4\",\"135721312\",\"265289728\",\"954728448\",\"1.8.0_265\",\"Private Build\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 18:39:48\",\"2020-10-09 03:04:57\",\"2020-10-09 01:46:34\"','\"000\",\"vps806731\"',NULL,29,'heartbeat','41065.503305',NULL,NULL,NULL,0,'2020-11-09 18:39:48'),(4731,'sym_node_host','U','\"001\",\"DESKTOP-8SVEEPF\",\"DESKTOP-8SVEEPF-e685a8bc-d71f-4e3b-a371-88cec8569ec5\",\"192.168.0.50\",\"HYSTOU\",\"Windows 10\",\"amd64\",\"10.0\",\"4\",\"32855864\",\"123207680\",\"1888485376\",\"1.8.0_231\",\"Oracle Corporation\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 18:48:06\",\"2020-11-05 18:29:50\",\"2020-10-09 01:47:21\"','\"001\",\"DESKTOP-8SVEEPF\"',NULL,29,'heartbeat','41075.503718','001',NULL,NULL,0,'2020-11-09 18:48:06'),(4732,'sym_node_host','U','\"000\",\"vps806731\",\"vps806731-b0a85d78-4774-49a2-afde-57b1ec6483c6\",\"217.182.66.168\",\"root\",\"Linux\",\"amd64\",\"4.15.0-101-generic\",\"4\",\"151602224\",\"265289728\",\"954728448\",\"1.8.0_265\",\"Private Build\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 18:54:48\",\"2020-10-09 03:04:57\",\"2020-10-09 01:46:34\"','\"000\",\"vps806731\"',NULL,29,'heartbeat','41081.504065',NULL,NULL,NULL,0,'2020-11-09 18:54:48'),(4733,'sym_node_host','U','\"001\",\"DESKTOP-8SVEEPF\",\"DESKTOP-8SVEEPF-e685a8bc-d71f-4e3b-a371-88cec8569ec5\",\"192.168.0.50\",\"HYSTOU\",\"Windows 10\",\"amd64\",\"10.0\",\"4\",\"51122440\",\"123207680\",\"1888485376\",\"1.8.0_231\",\"Oracle Corporation\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 19:02:58\",\"2020-11-05 18:29:50\",\"2020-10-09 01:47:21\"','\"001\",\"DESKTOP-8SVEEPF\"',NULL,29,'heartbeat','41090.504469','001',NULL,NULL,0,'2020-11-09 19:02:58'),(4734,'sym_node_host','U','\"000\",\"vps806731\",\"vps806731-b0a85d78-4774-49a2-afde-57b1ec6483c6\",\"217.182.66.168\",\"root\",\"Linux\",\"amd64\",\"4.15.0-101-generic\",\"4\",\"163241424\",\"265289728\",\"954728448\",\"1.8.0_265\",\"Private Build\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 19:09:48\",\"2020-10-09 03:04:57\",\"2020-10-09 01:46:34\"','\"000\",\"vps806731\"',NULL,29,'heartbeat','41100.504819',NULL,NULL,NULL,0,'2020-11-09 19:09:48'),(4735,'sym_node_host','U','\"001\",\"DESKTOP-8SVEEPF\",\"DESKTOP-8SVEEPF-e685a8bc-d71f-4e3b-a371-88cec8569ec5\",\"192.168.0.50\",\"HYSTOU\",\"Windows 10\",\"amd64\",\"10.0\",\"4\",\"40067200\",\"123207680\",\"1888485376\",\"1.8.0_231\",\"Oracle Corporation\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 19:17:58\",\"2020-11-05 18:29:50\",\"2020-10-09 01:47:21\"','\"001\",\"DESKTOP-8SVEEPF\"',NULL,29,'heartbeat','41110.505225','001',NULL,NULL,0,'2020-11-09 19:17:58'),(4736,'sym_node_host','U','\"000\",\"vps806731\",\"vps806731-b0a85d78-4774-49a2-afde-57b1ec6483c6\",\"217.182.66.168\",\"root\",\"Linux\",\"amd64\",\"4.15.0-101-generic\",\"4\",\"180863600\",\"265289728\",\"954728448\",\"1.8.0_265\",\"Private Build\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 19:24:48\",\"2020-10-09 03:04:57\",\"2020-10-09 01:46:34\"','\"000\",\"vps806731\"',NULL,29,'heartbeat','41116.505576',NULL,NULL,NULL,0,'2020-11-09 19:24:48'),(4737,'sym_node_host','U','\"001\",\"DESKTOP-8SVEEPF\",\"DESKTOP-8SVEEPF-e685a8bc-d71f-4e3b-a371-88cec8569ec5\",\"192.168.0.50\",\"HYSTOU\",\"Windows 10\",\"amd64\",\"10.0\",\"4\",\"28672000\",\"123207680\",\"1888485376\",\"1.8.0_231\",\"Oracle Corporation\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 19:32:59\",\"2020-11-05 18:29:50\",\"2020-10-09 01:47:21\"','\"001\",\"DESKTOP-8SVEEPF\"',NULL,29,'heartbeat','41127.505985','001',NULL,NULL,0,'2020-11-09 19:32:59'),(4738,'sym_node_host','U','\"000\",\"vps806731\",\"vps806731-b0a85d78-4774-49a2-afde-57b1ec6483c6\",\"217.182.66.168\",\"root\",\"Linux\",\"amd64\",\"4.15.0-101-generic\",\"4\",\"195127632\",\"265289728\",\"954728448\",\"1.8.0_265\",\"Private Build\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 19:39:48\",\"2020-10-09 03:04:57\",\"2020-10-09 01:46:34\"','\"000\",\"vps806731\"',NULL,29,'heartbeat','41136.506328',NULL,NULL,NULL,0,'2020-11-09 19:39:48'),(4739,'sym_node_host','U','\"001\",\"DESKTOP-8SVEEPF\",\"DESKTOP-8SVEEPF-e685a8bc-d71f-4e3b-a371-88cec8569ec5\",\"192.168.0.50\",\"HYSTOU\",\"Windows 10\",\"amd64\",\"10.0\",\"4\",\"45149456\",\"123207680\",\"1888485376\",\"1.8.0_231\",\"Oracle Corporation\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 19:48:01\",\"2020-11-05 18:29:50\",\"2020-10-09 01:47:21\"','\"001\",\"DESKTOP-8SVEEPF\"',NULL,29,'heartbeat','41146.506737','001',NULL,NULL,0,'2020-11-09 19:48:00'),(4740,'sym_node_host','U','\"000\",\"vps806731\",\"vps806731-b0a85d78-4774-49a2-afde-57b1ec6483c6\",\"217.182.66.168\",\"root\",\"Linux\",\"amd64\",\"4.15.0-101-generic\",\"4\",\"127772128\",\"265289728\",\"954728448\",\"1.8.0_265\",\"Private Build\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 19:54:48\",\"2020-10-09 03:04:57\",\"2020-10-09 01:46:34\"','\"000\",\"vps806731\"',NULL,29,'heartbeat','41152.507080',NULL,NULL,NULL,0,'2020-11-09 19:54:48'),(4741,'sym_node_host','U','\"001\",\"DESKTOP-8SVEEPF\",\"DESKTOP-8SVEEPF-e685a8bc-d71f-4e3b-a371-88cec8569ec5\",\"192.168.0.50\",\"HYSTOU\",\"Windows 10\",\"amd64\",\"10.0\",\"4\",\"28186592\",\"123207680\",\"1888485376\",\"1.8.0_231\",\"Oracle Corporation\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 20:03:01\",\"2020-11-05 18:29:50\",\"2020-10-09 01:47:21\"','\"001\",\"DESKTOP-8SVEEPF\"',NULL,29,'heartbeat','41163.507537','001',NULL,NULL,0,'2020-11-09 20:03:00'),(4742,'sym_node_host','U','\"000\",\"vps806731\",\"vps806731-b0a85d78-4774-49a2-afde-57b1ec6483c6\",\"217.182.66.168\",\"root\",\"Linux\",\"amd64\",\"4.15.0-101-generic\",\"4\",\"138437640\",\"265289728\",\"954728448\",\"1.8.0_265\",\"Private Build\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 20:09:48\",\"2020-10-09 03:04:57\",\"2020-10-09 01:46:34\"','\"000\",\"vps806731\"',NULL,29,'heartbeat','41169.507880',NULL,NULL,NULL,0,'2020-11-09 20:09:48'),(4743,'sym_node_host','U','\"001\",\"DESKTOP-8SVEEPF\",\"DESKTOP-8SVEEPF-e685a8bc-d71f-4e3b-a371-88cec8569ec5\",\"192.168.0.50\",\"HYSTOU\",\"Windows 10\",\"amd64\",\"10.0\",\"4\",\"44370840\",\"123207680\",\"1888485376\",\"1.8.0_231\",\"Oracle Corporation\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 20:18:03\",\"2020-11-05 18:29:50\",\"2020-10-09 01:47:21\"','\"001\",\"DESKTOP-8SVEEPF\"',NULL,29,'heartbeat','41178.508303','001',NULL,NULL,0,'2020-11-09 20:18:02'),(4744,'sym_node_host','U','\"000\",\"vps806731\",\"vps806731-b0a85d78-4774-49a2-afde-57b1ec6483c6\",\"217.182.66.168\",\"root\",\"Linux\",\"amd64\",\"4.15.0-101-generic\",\"4\",\"153622200\",\"265289728\",\"954728448\",\"1.8.0_265\",\"Private Build\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 20:24:48\",\"2020-10-09 03:04:57\",\"2020-10-09 01:46:34\"','\"000\",\"vps806731\"',NULL,29,'heartbeat','41185.508658',NULL,NULL,NULL,0,'2020-11-09 20:24:48'),(4745,'sym_node_host','U','\"001\",\"DESKTOP-8SVEEPF\",\"DESKTOP-8SVEEPF-e685a8bc-d71f-4e3b-a371-88cec8569ec5\",\"192.168.0.50\",\"HYSTOU\",\"Windows 10\",\"amd64\",\"10.0\",\"4\",\"32317912\",\"123207680\",\"1888485376\",\"1.8.0_231\",\"Oracle Corporation\",\"mysql-connector-java-5.1.45 ( Revision: 9131eefa398531c7dc98776e8a3fe839e544c5b2 )\",\"3.12.4\",\"+01:00\",\"2020-11-09 20:33:04\",\"2020-11-05 18:29:50\",\"2020-10-09 01:47:21\"','\"001\",\"DESKTOP-8SVEEPF\"',NULL,29,'heartbeat','41197.509075','001',NULL,NULL,0,'2020-11-09 20:33:03');

--
-- Table structure for table `sym_data_event`
--

CREATE TABLE `sym_data_event` (
  `data_id` bigint(20) NOT NULL,
  `batch_id` bigint(20) NOT NULL,
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`data_id`,`batch_id`),
  KEY `sym_idx_de_batchid` (`batch_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_data_event`
--

INSERT INTO `sym_data_event` VALUES (4725,4635,'2020-11-09 18:03:06'),(4726,4636,'2020-11-09 18:09:51'),(4727,4637,'2020-11-09 18:18:07'),(4728,4638,'2020-11-09 18:24:52'),(4729,4639,'2020-11-09 18:33:08'),(4730,4640,'2020-11-09 18:39:48'),(4731,4641,'2020-11-09 18:48:09'),(4732,4642,'2020-11-09 18:54:50'),(4733,4643,'2020-11-09 19:03:00'),(4734,4644,'2020-11-09 19:09:51'),(4735,4645,'2020-11-09 19:18:02'),(4736,4646,'2020-11-09 19:24:52'),(4737,4647,'2020-11-09 19:33:03'),(4738,4648,'2020-11-09 19:39:48'),(4739,4649,'2020-11-09 19:48:04'),(4740,4650,'2020-11-09 19:54:49'),(4741,4651,'2020-11-09 20:03:05'),(4742,4652,'2020-11-09 20:09:50'),(4743,4653,'2020-11-09 20:18:06'),(4744,4654,'2020-11-09 20:24:51'),(4745,4655,'2020-11-09 20:33:07');

--
-- Table structure for table `sym_data_gap`
--

CREATE TABLE `sym_data_gap` (
  `start_id` bigint(20) NOT NULL,
  `end_id` bigint(20) NOT NULL,
  `create_time` datetime NOT NULL,
  `last_update_hostname` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`start_id`,`end_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_data_gap`
--

INSERT INTO `sym_data_gap` VALUES (4746,50004745,'2020-11-09 20:33:07','vps806731');

--
-- Table structure for table `sym_extension`
--

CREATE TABLE `sym_extension` (
  `extension_id` varchar(50) NOT NULL,
  `extension_type` varchar(10) NOT NULL,
  `interface_name` varchar(255) DEFAULT NULL,
  `node_group_id` varchar(50) NOT NULL,
  `enabled` smallint(6) NOT NULL DEFAULT '1',
  `extension_order` int(11) NOT NULL DEFAULT '1',
  `extension_text` mediumtext,
  `create_time` datetime DEFAULT NULL,
  `last_update_by` varchar(50) DEFAULT NULL,
  `last_update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`extension_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_extension`
--

DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_I_FOR_SYM_XTNSN_C4RG after insert on `c4rg0airv2`.`sym_extension`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, row_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_extension',                                                                                                                                            
                                      'I',                                                                                                                                                             
                                      24,                                                                                                                                             
                                      concat(
          cast(if(new.`extension_id` is null,'',concat('"',replace(replace(new.`extension_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`extension_type` is null,'',concat('"',replace(replace(new.`extension_type`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`interface_name` is null,'',concat('"',replace(replace(new.`interface_name`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`node_group_id` is null,'',concat('"',replace(replace(new.`node_group_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`enabled` is null,'',concat('"',cast(new.`enabled` as char),'"')),',',
          if(new.`extension_order` is null,'',concat('"',cast(new.`extension_order` as char),'"')),',',
          cast(if(new.`extension_text` is null,'',concat('"',replace(replace(new.`extension_text`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"'))                                                                                                                                                
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_U_FOR_SYM_XTNSN_C4RG after update on `c4rg0airv2`.`sym_extension`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                  DECLARE var_row_data mediumtext character set utf8;                                                                                                                                      
                                  DECLARE var_old_data mediumtext character set utf8;                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                   set var_row_data = concat(
          cast(if(new.`extension_id` is null,'',concat('"',replace(replace(new.`extension_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`extension_type` is null,'',concat('"',replace(replace(new.`extension_type`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`interface_name` is null,'',concat('"',replace(replace(new.`interface_name`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`node_group_id` is null,'',concat('"',replace(replace(new.`node_group_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`enabled` is null,'',concat('"',cast(new.`enabled` as char),'"')),',',
          if(new.`extension_order` is null,'',concat('"',cast(new.`extension_order` as char),'"')),',',
          cast(if(new.`extension_text` is null,'',concat('"',replace(replace(new.`extension_text`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"')));                                                                                                                              
                                   set var_old_data = concat(null);                                                                                                                           
                                   if 1=1 then                                                                                                                                  
                                        insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, row_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                        values(                                                                                                                                                           
                                          'sym_extension',                                                                                                                                           
                                          'U',                                                                                                                                                            
                                          24,                                                                                                                                            
                                          concat(
          cast(if(old.`extension_id` is null,'',concat('"',replace(replace(old.`extension_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                               
                                           ),                                                                                                                                                             
                                          var_row_data,                                                                                                                                                   
                                          var_old_data,                                                                                                                                                   
                                          'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                       
                                          null,                                                                                                                                              
                                          CURRENT_TIMESTAMP                                                                                                                                               
                                        );                                                                                                                                                                
                                    end if;                                                                                                                                                               
                                  end if;                                                                                                                                                                
                                                                                                                                                                                    
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_D_FOR_SYM_XTNSN_C4RG after delete on `c4rg0airv2`.`sym_extension`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_extension',                                                                                                                                            
                                      'D',                                                                                                                                                             
                                      24,                                                                                                                                             
                                      concat(
          cast(if(old.`extension_id` is null,'',concat('"',replace(replace(old.`extension_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                                
                                       ),                                                                                                                                                              
                                       concat(null                                                                                                                                            
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;

--
-- Table structure for table `sym_extract_request`
--

CREATE TABLE `sym_extract_request` (
  `request_id` bigint(20) NOT NULL,
  `node_id` varchar(50) NOT NULL,
  `queue` varchar(128) DEFAULT NULL,
  `status` char(2) DEFAULT NULL,
  `start_batch_id` bigint(20) NOT NULL,
  `end_batch_id` bigint(20) NOT NULL,
  `trigger_id` varchar(128) NOT NULL,
  `router_id` varchar(50) NOT NULL,
  `load_id` bigint(20) DEFAULT NULL,
  `table_name` varchar(255) DEFAULT NULL,
  `extracted_rows` bigint(20) NOT NULL DEFAULT '0',
  `extracted_millis` bigint(20) NOT NULL DEFAULT '0',
  `transferred_rows` bigint(20) NOT NULL DEFAULT '0',
  `transferred_millis` bigint(20) NOT NULL DEFAULT '0',
  `last_transferred_batch_id` bigint(20) DEFAULT NULL,
  `loaded_rows` bigint(20) NOT NULL DEFAULT '0',
  `loaded_millis` bigint(20) NOT NULL DEFAULT '0',
  `last_loaded_batch_id` bigint(20) DEFAULT NULL,
  `total_rows` bigint(20) DEFAULT NULL,
  `loaded_time` datetime DEFAULT NULL,
  `parent_request_id` bigint(20) NOT NULL DEFAULT '0',
  `last_update_time` datetime DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`request_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_extract_request`
--


--
-- Table structure for table `sym_file_incoming`
--

CREATE TABLE `sym_file_incoming` (
  `relative_dir` varchar(255) NOT NULL,
  `file_name` varchar(128) NOT NULL,
  `last_event_type` char(1) NOT NULL,
  `node_id` varchar(50) NOT NULL,
  `file_modified_time` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`relative_dir`,`file_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_file_incoming`
--


--
-- Table structure for table `sym_file_snapshot`
--

CREATE TABLE `sym_file_snapshot` (
  `trigger_id` varchar(128) NOT NULL,
  `router_id` varchar(50) NOT NULL,
  `relative_dir` varchar(255) NOT NULL,
  `file_name` varchar(128) NOT NULL,
  `channel_id` varchar(128) NOT NULL DEFAULT 'filesync',
  `reload_channel_id` varchar(128) NOT NULL DEFAULT 'filesync_reload',
  `last_event_type` char(1) NOT NULL,
  `crc32_checksum` bigint(20) DEFAULT NULL,
  `file_size` bigint(20) DEFAULT NULL,
  `file_modified_time` bigint(20) DEFAULT NULL,
  `last_update_time` datetime NOT NULL,
  `last_update_by` varchar(50) DEFAULT NULL,
  `create_time` datetime NOT NULL,
  PRIMARY KEY (`trigger_id`,`router_id`,`relative_dir`,`file_name`),
  KEY `sym_idx_f_snpsht_chid` (`reload_channel_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_file_snapshot`
--


--
-- Table structure for table `sym_file_trigger`
--

CREATE TABLE `sym_file_trigger` (
  `trigger_id` varchar(128) NOT NULL,
  `channel_id` varchar(128) NOT NULL DEFAULT 'filesync',
  `reload_channel_id` varchar(128) NOT NULL DEFAULT 'filesync_reload',
  `base_dir` varchar(255) NOT NULL,
  `recurse` smallint(6) NOT NULL DEFAULT '1',
  `includes_files` varchar(255) DEFAULT NULL,
  `excludes_files` varchar(255) DEFAULT NULL,
  `sync_on_create` smallint(6) NOT NULL DEFAULT '1',
  `sync_on_modified` smallint(6) NOT NULL DEFAULT '1',
  `sync_on_delete` smallint(6) NOT NULL DEFAULT '1',
  `sync_on_ctl_file` smallint(6) NOT NULL DEFAULT '0',
  `delete_after_sync` smallint(6) NOT NULL DEFAULT '0',
  `before_copy_script` mediumtext,
  `after_copy_script` mediumtext,
  `create_time` datetime NOT NULL,
  `last_update_by` varchar(50) DEFAULT NULL,
  `last_update_time` datetime NOT NULL,
  `description` mediumtext,
  PRIMARY KEY (`trigger_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_file_trigger`
--

DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_I_FOR_SYM_FL_TRGGR_C4RG after insert on `c4rg0airv2`.`sym_file_trigger`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, row_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_file_trigger',                                                                                                                                            
                                      'I',                                                                                                                                                             
                                      12,                                                                                                                                             
                                      concat(
          cast(if(new.`trigger_id` is null,'',concat('"',replace(replace(new.`trigger_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`channel_id` is null,'',concat('"',replace(replace(new.`channel_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`reload_channel_id` is null,'',concat('"',replace(replace(new.`reload_channel_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`base_dir` is null,'',concat('"',replace(replace(new.`base_dir`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`recurse` is null,'',concat('"',cast(new.`recurse` as char),'"')),',',
          cast(if(new.`includes_files` is null,'',concat('"',replace(replace(new.`includes_files`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`excludes_files` is null,'',concat('"',replace(replace(new.`excludes_files`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`sync_on_create` is null,'',concat('"',cast(new.`sync_on_create` as char),'"')),',',
          if(new.`sync_on_modified` is null,'',concat('"',cast(new.`sync_on_modified` as char),'"')),',',
          if(new.`sync_on_delete` is null,'',concat('"',cast(new.`sync_on_delete` as char),'"')),',',
          if(new.`sync_on_ctl_file` is null,'',concat('"',cast(new.`sync_on_ctl_file` as char),'"')),',',
          if(new.`delete_after_sync` is null,'',concat('"',cast(new.`delete_after_sync` as char),'"')),',',
          cast(if(new.`before_copy_script` is null,'',concat('"',replace(replace(new.`before_copy_script`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`after_copy_script` is null,'',concat('"',replace(replace(new.`after_copy_script`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"')),',',
          cast(if(new.`description` is null,'',concat('"',replace(replace(new.`description`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                                
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_U_FOR_SYM_FL_TRGGR_C4RG after update on `c4rg0airv2`.`sym_file_trigger`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                  DECLARE var_row_data mediumtext character set utf8;                                                                                                                                      
                                  DECLARE var_old_data mediumtext character set utf8;                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                   set var_row_data = concat(
          cast(if(new.`trigger_id` is null,'',concat('"',replace(replace(new.`trigger_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`channel_id` is null,'',concat('"',replace(replace(new.`channel_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`reload_channel_id` is null,'',concat('"',replace(replace(new.`reload_channel_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`base_dir` is null,'',concat('"',replace(replace(new.`base_dir`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`recurse` is null,'',concat('"',cast(new.`recurse` as char),'"')),',',
          cast(if(new.`includes_files` is null,'',concat('"',replace(replace(new.`includes_files`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`excludes_files` is null,'',concat('"',replace(replace(new.`excludes_files`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`sync_on_create` is null,'',concat('"',cast(new.`sync_on_create` as char),'"')),',',
          if(new.`sync_on_modified` is null,'',concat('"',cast(new.`sync_on_modified` as char),'"')),',',
          if(new.`sync_on_delete` is null,'',concat('"',cast(new.`sync_on_delete` as char),'"')),',',
          if(new.`sync_on_ctl_file` is null,'',concat('"',cast(new.`sync_on_ctl_file` as char),'"')),',',
          if(new.`delete_after_sync` is null,'',concat('"',cast(new.`delete_after_sync` as char),'"')),',',
          cast(if(new.`before_copy_script` is null,'',concat('"',replace(replace(new.`before_copy_script`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`after_copy_script` is null,'',concat('"',replace(replace(new.`after_copy_script`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"')),',',
          cast(if(new.`description` is null,'',concat('"',replace(replace(new.`description`,'\\','\\\\'),'"','\\"'),'"')) as char));                                                                                                                              
                                   set var_old_data = concat(null);                                                                                                                           
                                   if 1=1 then                                                                                                                                  
                                        insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, row_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                        values(                                                                                                                                                           
                                          'sym_file_trigger',                                                                                                                                           
                                          'U',                                                                                                                                                            
                                          12,                                                                                                                                            
                                          concat(
          cast(if(old.`trigger_id` is null,'',concat('"',replace(replace(old.`trigger_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                               
                                           ),                                                                                                                                                             
                                          var_row_data,                                                                                                                                                   
                                          var_old_data,                                                                                                                                                   
                                          'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                       
                                          null,                                                                                                                                              
                                          CURRENT_TIMESTAMP                                                                                                                                               
                                        );                                                                                                                                                                
                                    end if;                                                                                                                                                               
                                  end if;                                                                                                                                                                
                                                                                                                                                                                    
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_D_FOR_SYM_FL_TRGGR_C4RG after delete on `c4rg0airv2`.`sym_file_trigger`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_file_trigger',                                                                                                                                            
                                      'D',                                                                                                                                                             
                                      12,                                                                                                                                             
                                      concat(
          cast(if(old.`trigger_id` is null,'',concat('"',replace(replace(old.`trigger_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                                
                                       ),                                                                                                                                                              
                                       concat(null                                                                                                                                            
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;

--
-- Table structure for table `sym_file_trigger_router`
--

CREATE TABLE `sym_file_trigger_router` (
  `trigger_id` varchar(128) NOT NULL,
  `router_id` varchar(50) NOT NULL,
  `enabled` smallint(6) NOT NULL DEFAULT '1',
  `initial_load_enabled` smallint(6) NOT NULL DEFAULT '1',
  `target_base_dir` varchar(255) DEFAULT NULL,
  `conflict_strategy` varchar(128) NOT NULL DEFAULT 'source_wins',
  `create_time` datetime NOT NULL,
  `last_update_by` varchar(50) DEFAULT NULL,
  `last_update_time` datetime NOT NULL,
  `description` mediumtext,
  PRIMARY KEY (`trigger_id`,`router_id`),
  KEY `sym_fk_ftr_2_rtr` (`router_id`),
  CONSTRAINT `sym_fk_ftr_2_ftrg` FOREIGN KEY (`trigger_id`) REFERENCES `sym_file_trigger` (`trigger_id`),
  CONSTRAINT `sym_fk_ftr_2_rtr` FOREIGN KEY (`router_id`) REFERENCES `sym_router` (`router_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_file_trigger_router`
--

DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_I_FOR_SYM_FL_TRGGR_RTR_C4RG after insert on `c4rg0airv2`.`sym_file_trigger_router`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, row_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_file_trigger_router',                                                                                                                                            
                                      'I',                                                                                                                                                             
                                      6,                                                                                                                                             
                                      concat(
          cast(if(new.`trigger_id` is null,'',concat('"',replace(replace(new.`trigger_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`router_id` is null,'',concat('"',replace(replace(new.`router_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`enabled` is null,'',concat('"',cast(new.`enabled` as char),'"')),',',
          if(new.`initial_load_enabled` is null,'',concat('"',cast(new.`initial_load_enabled` as char),'"')),',',
          cast(if(new.`target_base_dir` is null,'',concat('"',replace(replace(new.`target_base_dir`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`conflict_strategy` is null,'',concat('"',replace(replace(new.`conflict_strategy`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"')),',',
          cast(if(new.`description` is null,'',concat('"',replace(replace(new.`description`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                                
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_U_FOR_SYM_FL_TRGGR_RTR_C4RG after update on `c4rg0airv2`.`sym_file_trigger_router`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                  DECLARE var_row_data mediumtext character set utf8;                                                                                                                                      
                                  DECLARE var_old_data mediumtext character set utf8;                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                   set var_row_data = concat(
          cast(if(new.`trigger_id` is null,'',concat('"',replace(replace(new.`trigger_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`router_id` is null,'',concat('"',replace(replace(new.`router_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`enabled` is null,'',concat('"',cast(new.`enabled` as char),'"')),',',
          if(new.`initial_load_enabled` is null,'',concat('"',cast(new.`initial_load_enabled` as char),'"')),',',
          cast(if(new.`target_base_dir` is null,'',concat('"',replace(replace(new.`target_base_dir`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`conflict_strategy` is null,'',concat('"',replace(replace(new.`conflict_strategy`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"')),',',
          cast(if(new.`description` is null,'',concat('"',replace(replace(new.`description`,'\\','\\\\'),'"','\\"'),'"')) as char));                                                                                                                              
                                   set var_old_data = concat(null);                                                                                                                           
                                   if 1=1 then                                                                                                                                  
                                        insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, row_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                        values(                                                                                                                                                           
                                          'sym_file_trigger_router',                                                                                                                                           
                                          'U',                                                                                                                                                            
                                          6,                                                                                                                                            
                                          concat(
          cast(if(old.`trigger_id` is null,'',concat('"',replace(replace(old.`trigger_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(old.`router_id` is null,'',concat('"',replace(replace(old.`router_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                               
                                           ),                                                                                                                                                             
                                          var_row_data,                                                                                                                                                   
                                          var_old_data,                                                                                                                                                   
                                          'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                       
                                          null,                                                                                                                                              
                                          CURRENT_TIMESTAMP                                                                                                                                               
                                        );                                                                                                                                                                
                                    end if;                                                                                                                                                               
                                  end if;                                                                                                                                                                
                                                                                                                                                                                    
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_D_FOR_SYM_FL_TRGGR_RTR_C4RG after delete on `c4rg0airv2`.`sym_file_trigger_router`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_file_trigger_router',                                                                                                                                            
                                      'D',                                                                                                                                                             
                                      6,                                                                                                                                             
                                      concat(
          cast(if(old.`trigger_id` is null,'',concat('"',replace(replace(old.`trigger_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(old.`router_id` is null,'',concat('"',replace(replace(old.`router_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                                
                                       ),                                                                                                                                                              
                                       concat(null                                                                                                                                            
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;

--
-- Table structure for table `sym_grouplet`
--

CREATE TABLE `sym_grouplet` (
  `grouplet_id` varchar(50) NOT NULL,
  `grouplet_link_policy` char(1) NOT NULL DEFAULT 'I',
  `description` varchar(255) DEFAULT NULL,
  `create_time` datetime NOT NULL,
  `last_update_by` varchar(50) DEFAULT NULL,
  `last_update_time` datetime NOT NULL,
  PRIMARY KEY (`grouplet_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_grouplet`
--

DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_I_FOR_SYM_GRPLT_C4RG after insert on `c4rg0airv2`.`sym_grouplet`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, row_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_grouplet',                                                                                                                                            
                                      'I',                                                                                                                                                             
                                      10,                                                                                                                                             
                                      concat(
          cast(if(new.`grouplet_id` is null,'',concat('"',replace(replace(new.`grouplet_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`grouplet_link_policy` is null,'',concat('"',replace(replace(new.`grouplet_link_policy`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`description` is null,'',concat('"',replace(replace(new.`description`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"'))                                                                                                                                                
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_U_FOR_SYM_GRPLT_C4RG after update on `c4rg0airv2`.`sym_grouplet`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                  DECLARE var_row_data mediumtext character set utf8;                                                                                                                                      
                                  DECLARE var_old_data mediumtext character set utf8;                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                   set var_row_data = concat(
          cast(if(new.`grouplet_id` is null,'',concat('"',replace(replace(new.`grouplet_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`grouplet_link_policy` is null,'',concat('"',replace(replace(new.`grouplet_link_policy`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`description` is null,'',concat('"',replace(replace(new.`description`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"')));                                                                                                                              
                                   set var_old_data = concat(null);                                                                                                                           
                                   if 1=1 then                                                                                                                                  
                                        insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, row_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                        values(                                                                                                                                                           
                                          'sym_grouplet',                                                                                                                                           
                                          'U',                                                                                                                                                            
                                          10,                                                                                                                                            
                                          concat(
          cast(if(old.`grouplet_id` is null,'',concat('"',replace(replace(old.`grouplet_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                               
                                           ),                                                                                                                                                             
                                          var_row_data,                                                                                                                                                   
                                          var_old_data,                                                                                                                                                   
                                          'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                       
                                          null,                                                                                                                                              
                                          CURRENT_TIMESTAMP                                                                                                                                               
                                        );                                                                                                                                                                
                                    end if;                                                                                                                                                               
                                  end if;                                                                                                                                                                
                                                                                                                                                                                    
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_D_FOR_SYM_GRPLT_C4RG after delete on `c4rg0airv2`.`sym_grouplet`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_grouplet',                                                                                                                                            
                                      'D',                                                                                                                                                             
                                      10,                                                                                                                                             
                                      concat(
          cast(if(old.`grouplet_id` is null,'',concat('"',replace(replace(old.`grouplet_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                                
                                       ),                                                                                                                                                              
                                       concat(null                                                                                                                                            
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;

--
-- Table structure for table `sym_grouplet_link`
--

CREATE TABLE `sym_grouplet_link` (
  `grouplet_id` varchar(50) NOT NULL,
  `external_id` varchar(255) NOT NULL,
  `create_time` datetime NOT NULL,
  `last_update_by` varchar(50) DEFAULT NULL,
  `last_update_time` datetime NOT NULL,
  PRIMARY KEY (`grouplet_id`,`external_id`),
  CONSTRAINT `sym_fk_gpltlnk_2_gplt` FOREIGN KEY (`grouplet_id`) REFERENCES `sym_grouplet` (`grouplet_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_grouplet_link`
--

DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_I_FOR_SYM_GRPLT_LNK_C4RG after insert on `c4rg0airv2`.`sym_grouplet_link`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, row_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_grouplet_link',                                                                                                                                            
                                      'I',                                                                                                                                                             
                                      9,                                                                                                                                             
                                      concat(
          cast(if(new.`grouplet_id` is null,'',concat('"',replace(replace(new.`grouplet_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`external_id` is null,'',concat('"',replace(replace(new.`external_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"'))                                                                                                                                                
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_U_FOR_SYM_GRPLT_LNK_C4RG after update on `c4rg0airv2`.`sym_grouplet_link`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                  DECLARE var_row_data mediumtext character set utf8;                                                                                                                                      
                                  DECLARE var_old_data mediumtext character set utf8;                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                   set var_row_data = concat(
          cast(if(new.`grouplet_id` is null,'',concat('"',replace(replace(new.`grouplet_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`external_id` is null,'',concat('"',replace(replace(new.`external_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"')));                                                                                                                              
                                   set var_old_data = concat(null);                                                                                                                           
                                   if 1=1 then                                                                                                                                  
                                        insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, row_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                        values(                                                                                                                                                           
                                          'sym_grouplet_link',                                                                                                                                           
                                          'U',                                                                                                                                                            
                                          9,                                                                                                                                            
                                          concat(
          cast(if(old.`grouplet_id` is null,'',concat('"',replace(replace(old.`grouplet_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(old.`external_id` is null,'',concat('"',replace(replace(old.`external_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                               
                                           ),                                                                                                                                                             
                                          var_row_data,                                                                                                                                                   
                                          var_old_data,                                                                                                                                                   
                                          'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                       
                                          null,                                                                                                                                              
                                          CURRENT_TIMESTAMP                                                                                                                                               
                                        );                                                                                                                                                                
                                    end if;                                                                                                                                                               
                                  end if;                                                                                                                                                                
                                                                                                                                                                                    
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_D_FOR_SYM_GRPLT_LNK_C4RG after delete on `c4rg0airv2`.`sym_grouplet_link`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_grouplet_link',                                                                                                                                            
                                      'D',                                                                                                                                                             
                                      9,                                                                                                                                             
                                      concat(
          cast(if(old.`grouplet_id` is null,'',concat('"',replace(replace(old.`grouplet_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(old.`external_id` is null,'',concat('"',replace(replace(old.`external_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                                
                                       ),                                                                                                                                                              
                                       concat(null                                                                                                                                            
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;

--
-- Table structure for table `sym_incoming_batch`
--

CREATE TABLE `sym_incoming_batch` (
  `batch_id` bigint(20) NOT NULL,
  `node_id` varchar(50) NOT NULL,
  `channel_id` varchar(128) DEFAULT NULL,
  `status` char(2) DEFAULT NULL,
  `error_flag` smallint(6) DEFAULT '0',
  `sql_state` varchar(10) DEFAULT NULL,
  `sql_code` int(11) NOT NULL DEFAULT '0',
  `sql_message` mediumtext,
  `last_update_hostname` varchar(255) DEFAULT NULL,
  `last_update_time` datetime DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `summary` varchar(255) DEFAULT NULL,
  `ignore_count` int(11) NOT NULL DEFAULT '0',
  `byte_count` bigint(20) NOT NULL DEFAULT '0',
  `load_flag` smallint(6) DEFAULT '0',
  `extract_count` int(11) NOT NULL DEFAULT '0',
  `sent_count` int(11) NOT NULL DEFAULT '0',
  `load_count` int(11) NOT NULL DEFAULT '0',
  `reload_row_count` int(11) NOT NULL DEFAULT '0',
  `other_row_count` int(11) NOT NULL DEFAULT '0',
  `data_row_count` int(11) NOT NULL DEFAULT '0',
  `extract_row_count` int(11) NOT NULL DEFAULT '0',
  `load_row_count` int(11) NOT NULL DEFAULT '0',
  `data_insert_row_count` int(11) NOT NULL DEFAULT '0',
  `data_update_row_count` int(11) NOT NULL DEFAULT '0',
  `data_delete_row_count` int(11) NOT NULL DEFAULT '0',
  `extract_insert_row_count` int(11) NOT NULL DEFAULT '0',
  `extract_update_row_count` int(11) NOT NULL DEFAULT '0',
  `extract_delete_row_count` int(11) NOT NULL DEFAULT '0',
  `load_insert_row_count` int(11) NOT NULL DEFAULT '0',
  `load_update_row_count` int(11) NOT NULL DEFAULT '0',
  `load_delete_row_count` int(11) NOT NULL DEFAULT '0',
  `network_millis` int(11) NOT NULL DEFAULT '0',
  `filter_millis` int(11) NOT NULL DEFAULT '0',
  `load_millis` int(11) NOT NULL DEFAULT '0',
  `router_millis` int(11) NOT NULL DEFAULT '0',
  `extract_millis` int(11) NOT NULL DEFAULT '0',
  `transform_extract_millis` int(11) NOT NULL DEFAULT '0',
  `transform_load_millis` int(11) NOT NULL DEFAULT '0',
  `load_id` bigint(20) DEFAULT NULL,
  `common_flag` smallint(6) DEFAULT '0',
  `fallback_insert_count` int(11) NOT NULL DEFAULT '0',
  `fallback_update_count` int(11) NOT NULL DEFAULT '0',
  `ignore_row_count` int(11) NOT NULL DEFAULT '0',
  `missing_delete_count` int(11) NOT NULL DEFAULT '0',
  `skip_count` int(11) NOT NULL DEFAULT '0',
  `failed_row_number` int(11) NOT NULL DEFAULT '0',
  `failed_line_number` int(11) NOT NULL DEFAULT '0',
  `failed_data_id` bigint(20) NOT NULL DEFAULT '0',
  PRIMARY KEY (`batch_id`,`node_id`),
  KEY `sym_idx_ib_time_status` (`create_time`,`status`),
  KEY `sym_idx_ib_in_error` (`error_flag`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_incoming_batch`
--

INSERT INTO `sym_incoming_batch` VALUES (4173,'001','c4rgo_transaction','LD',1,'23000',1048,'Column \'tipo_spedizione\' cannot be null','vps806731','2020-11-09 20:39:14','2020-11-05 18:50:52','session, barcode, volume, awbexport',0,2279,0,1,1,0,0,0,8,8,4,8,0,0,8,0,0,3,0,0,0,0,20,31,6,0,0,-1,0,0,0,0,0,0,4,4,0),(4175,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-05 20:00:07','2020-11-05 20:00:06','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4176,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-05 20:00:07','2020-11-05 20:00:07','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4304,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-06 12:00:07','2020-11-06 12:00:07','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4305,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-06 12:00:07','2020-11-06 12:00:07','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4306,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-06 12:00:07','2020-11-06 12:00:07','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4307,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-06 12:00:07','2020-11-06 12:00:07','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4308,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-06 12:00:07','2020-11-06 12:00:07','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4310,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-06 12:00:07','2020-11-06 12:00:07','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4419,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 01:00:05','2020-11-07 01:00:05','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4420,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 01:00:05','2020-11-07 01:00:05','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4421,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 01:00:05','2020-11-07 01:00:05','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4422,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 01:00:05','2020-11-07 01:00:05','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4493,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 10:00:00','2020-11-07 10:00:00','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4495,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 10:00:00','2020-11-07 10:00:00','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4496,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 10:00:00','2020-11-07 10:00:00','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4497,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 10:00:00','2020-11-07 10:00:00','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4498,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 10:00:00','2020-11-07 10:00:00','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4499,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 10:00:00','2020-11-07 10:00:00','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4500,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 10:00:00','2020-11-07 10:00:00','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4501,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 10:00:00','2020-11-07 10:00:00','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4502,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 10:00:00','2020-11-07 10:00:00','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4510,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4511,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4512,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4514,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4515,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4516,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4517,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4518,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4519,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4520,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4521,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4522,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4523,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4524,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4525,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4526,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4527,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4528,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4529,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4530,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4531,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4532,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4533,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4534,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4535,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4537,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4538,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4539,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4540,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-07 11:00:04','2020-11-07 11:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4959,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-09 16:00:04','2020-11-09 16:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4960,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-09 16:00:04','2020-11-09 16:00:04','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4961,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-09 16:00:05','2020-11-09 16:00:05','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4963,'001','c4rgo_transaction','RS',0,NULL,0,NULL,'vps806731','2020-11-09 16:00:05','2020-11-09 16:00:05','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0),(4989,'001','heartbeat','OK',0,NULL,0,NULL,'vps806731','2020-11-09 18:03:02','2020-11-09 18:03:02','sym_node_host',0,695,0,1,1,0,0,0,1,1,1,0,1,0,0,1,0,0,1,0,0,0,11,19,244,0,0,-1,0,0,0,0,0,0,0,0,0),(4991,'001','heartbeat','OK',0,NULL,0,NULL,'vps806731','2020-11-09 18:18:04','2020-11-09 18:18:03','sym_node_host',0,695,0,1,1,0,0,0,1,1,1,0,1,0,0,1,0,0,1,0,0,0,7,16,15,0,1,-1,0,0,0,0,0,0,0,0,0),(4993,'001','heartbeat','OK',0,NULL,0,NULL,'vps806731','2020-11-09 18:33:05','2020-11-09 18:33:05','sym_node_host',0,695,0,1,1,0,0,0,1,1,1,0,1,0,0,1,0,0,1,0,0,0,13,15,250,0,0,-1,0,0,0,0,0,0,0,0,0),(4995,'001','heartbeat','OK',0,NULL,0,NULL,'vps806731','2020-11-09 18:48:06','2020-11-09 18:48:06','sym_node_host',0,695,0,1,1,0,0,0,1,1,1,0,1,0,0,1,0,0,1,0,0,0,61,10,16,0,0,-1,0,0,0,0,0,0,0,0,0),(4997,'001','heartbeat','OK',0,NULL,0,NULL,'vps806731','2020-11-09 19:02:58','2020-11-09 19:02:57','sym_node_host',0,695,0,1,1,0,0,0,1,1,1,0,1,0,0,1,0,0,1,0,0,0,8,16,15,0,1,-1,0,0,0,0,0,0,0,0,0),(4999,'001','heartbeat','OK',0,NULL,0,NULL,'vps806731','2020-11-09 19:17:58','2020-11-09 19:17:58','sym_node_host',0,695,0,1,1,0,0,0,1,1,1,0,1,0,0,1,0,0,1,0,0,0,11,0,246,0,1,-1,0,0,0,0,0,0,0,0,0),(5001,'001','heartbeat','OK',0,NULL,0,NULL,'vps806731','2020-11-09 19:32:59','2020-11-09 19:32:59','sym_node_host',0,695,0,1,1,0,0,0,1,1,1,0,1,0,0,1,0,0,1,0,0,0,167,5,16,0,0,-1,0,0,0,0,0,0,0,0,0),(5003,'001','heartbeat','OK',0,NULL,0,NULL,'vps806731','2020-11-09 19:48:00','2020-11-09 19:48:00','sym_node_host',0,695,0,1,1,0,0,0,1,1,1,0,1,0,0,1,0,0,1,0,0,0,129,16,20,0,0,-1,0,0,0,0,0,0,0,0,0),(5005,'001','heartbeat','OK',0,NULL,0,NULL,'vps806731','2020-11-09 20:03:00','2020-11-09 20:03:00','sym_node_host',0,695,0,1,1,0,0,0,1,1,1,0,1,0,0,1,0,0,1,0,0,0,9,0,16,0,1,-1,0,0,0,0,0,0,0,0,0),(5007,'001','heartbeat','OK',0,NULL,0,NULL,'vps806731','2020-11-09 20:18:02','2020-11-09 20:18:02','sym_node_host',0,695,0,1,1,0,0,0,1,1,1,0,1,0,0,1,0,0,1,0,0,1,10,8,250,0,0,-1,0,0,0,0,0,0,0,0,0),(5009,'001','heartbeat','OK',0,NULL,0,NULL,'vps806731','2020-11-09 20:33:03','2020-11-09 20:33:03','sym_node_host',0,695,0,1,1,0,0,0,1,1,1,0,1,0,0,1,0,0,1,0,0,0,8,16,32,0,1,-1,0,0,0,0,0,0,0,0,0);

--
-- Table structure for table `sym_incoming_error`
--

CREATE TABLE `sym_incoming_error` (
  `batch_id` bigint(20) NOT NULL,
  `node_id` varchar(50) NOT NULL,
  `failed_row_number` bigint(20) NOT NULL,
  `failed_line_number` bigint(20) NOT NULL DEFAULT '0',
  `target_catalog_name` varchar(255) DEFAULT NULL,
  `target_schema_name` varchar(255) DEFAULT NULL,
  `target_table_name` varchar(255) NOT NULL,
  `event_type` char(1) NOT NULL,
  `binary_encoding` varchar(10) NOT NULL DEFAULT 'HEX',
  `column_names` mediumtext NOT NULL,
  `pk_column_names` mediumtext NOT NULL,
  `row_data` mediumtext,
  `old_data` mediumtext,
  `cur_data` mediumtext,
  `resolve_data` mediumtext,
  `resolve_ignore` smallint(6) DEFAULT '0',
  `conflict_id` varchar(50) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `last_update_by` varchar(50) DEFAULT NULL,
  `last_update_time` datetime NOT NULL,
  PRIMARY KEY (`batch_id`,`node_id`,`failed_row_number`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_incoming_error`
--

INSERT INTO `sym_incoming_error` VALUES (4173,'001',4,4,NULL,NULL,'awbexport','I','HEX','ID,sid,AWB,Data,Dest,NrPackages,TotPackages,GrossWeight,GrossWeightUM,NetWeight,NetWeightUM,WeighingID,HPackage,WPackage,LPackage,Inbound,RealVolume,InboundVolumeSurface,RealVolumeSurface,Vettore,Destinazione,Stato,Flags,StandBy,Congruita,UserIns,DataIns,UserMod,DataMod,PalletID,PalletHeight,PalletWeight,PalletDescr,PalletCode,VolumeFlag,MeasureFlag,ncolli,vol_flag,cancellato,pallet_op,ibx1,iby1,ibz1,ibx2,iby2,ibz2,ibx3,iby3,ibz3,ibx4,iby4,ibz4,ibx5,iby5,ibz5,ibx6,iby6,ibz6,ibx7,iby7,ibz7,ibx8,iby8,ibz8,obj_code,parent_id,tipo_spedizione','ID','\"13580\",\"{cfead92b-c3b4-4b3a-820e-392edd5e75c8}\",\"07438830153\",,,\"1\",\"1\",\"29.00\",\"kg\",\"29.00\",\"kg\",\"00000-006990\",\"1.06\",\"0.78\",\"1.09\",\"0.91\",\"0.76\",\"0.68\",\"0.84\",,,\"1\",\"0\",\"1\",,,\"2020-11-05 18:50:46\",,\"2020-11-05 18:50:46\",,,,,,,,\"0\",\"0\",,,,,,,,,,,,,,,,,,,,,,,,,,,,\"0\",',NULL,NULL,NULL,0,NULL,'2020-11-05 18:50:52','symmetricds','2020-11-05 18:50:52');

--
-- Table structure for table `sym_job`
--

CREATE TABLE `sym_job` (
  `job_name` varchar(50) NOT NULL,
  `job_type` varchar(10) NOT NULL,
  `requires_registration` smallint(6) NOT NULL DEFAULT '1',
  `job_expression` mediumtext,
  `description` varchar(255) DEFAULT NULL,
  `default_schedule` varchar(50) DEFAULT NULL,
  `default_auto_start` smallint(6) NOT NULL DEFAULT '1',
  `node_group_id` varchar(50) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `last_update_by` varchar(50) DEFAULT NULL,
  `last_update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`job_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_job`
--

DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_I_FOR_SYM_JB_C4RG after insert on `c4rg0airv2`.`sym_job`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, row_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_job',                                                                                                                                            
                                      'I',                                                                                                                                                             
                                      14,                                                                                                                                             
                                      concat(
          cast(if(new.`job_name` is null,'',concat('"',replace(replace(new.`job_name`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`job_type` is null,'',concat('"',replace(replace(new.`job_type`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`requires_registration` is null,'',concat('"',cast(new.`requires_registration` as char),'"')),',',
          cast(if(new.`job_expression` is null,'',concat('"',replace(replace(new.`job_expression`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`description` is null,'',concat('"',replace(replace(new.`description`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`default_schedule` is null,'',concat('"',replace(replace(new.`default_schedule`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`default_auto_start` is null,'',concat('"',cast(new.`default_auto_start` as char),'"')),',',
          cast(if(new.`node_group_id` is null,'',concat('"',replace(replace(new.`node_group_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`create_by` is null,'',concat('"',replace(replace(new.`create_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"'))                                                                                                                                                
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_U_FOR_SYM_JB_C4RG after update on `c4rg0airv2`.`sym_job`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                  DECLARE var_row_data mediumtext character set utf8;                                                                                                                                      
                                  DECLARE var_old_data mediumtext character set utf8;                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                   set var_row_data = concat(
          cast(if(new.`job_name` is null,'',concat('"',replace(replace(new.`job_name`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`job_type` is null,'',concat('"',replace(replace(new.`job_type`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`requires_registration` is null,'',concat('"',cast(new.`requires_registration` as char),'"')),',',
          cast(if(new.`job_expression` is null,'',concat('"',replace(replace(new.`job_expression`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`description` is null,'',concat('"',replace(replace(new.`description`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`default_schedule` is null,'',concat('"',replace(replace(new.`default_schedule`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`default_auto_start` is null,'',concat('"',cast(new.`default_auto_start` as char),'"')),',',
          cast(if(new.`node_group_id` is null,'',concat('"',replace(replace(new.`node_group_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`create_by` is null,'',concat('"',replace(replace(new.`create_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"')));                                                                                                                              
                                   set var_old_data = concat(null);                                                                                                                           
                                   if 1=1 then                                                                                                                                  
                                        insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, row_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                        values(                                                                                                                                                           
                                          'sym_job',                                                                                                                                           
                                          'U',                                                                                                                                                            
                                          14,                                                                                                                                            
                                          concat(
          cast(if(old.`job_name` is null,'',concat('"',replace(replace(old.`job_name`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                               
                                           ),                                                                                                                                                             
                                          var_row_data,                                                                                                                                                   
                                          var_old_data,                                                                                                                                                   
                                          'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                       
                                          null,                                                                                                                                              
                                          CURRENT_TIMESTAMP                                                                                                                                               
                                        );                                                                                                                                                                
                                    end if;                                                                                                                                                               
                                  end if;                                                                                                                                                                
                                                                                                                                                                                    
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_D_FOR_SYM_JB_C4RG after delete on `c4rg0airv2`.`sym_job`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_job',                                                                                                                                            
                                      'D',                                                                                                                                                             
                                      14,                                                                                                                                             
                                      concat(
          cast(if(old.`job_name` is null,'',concat('"',replace(replace(old.`job_name`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                                
                                       ),                                                                                                                                                              
                                       concat(null                                                                                                                                            
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;

--
-- Table structure for table `sym_load_filter`
--

CREATE TABLE `sym_load_filter` (
  `load_filter_id` varchar(50) NOT NULL,
  `load_filter_type` varchar(10) NOT NULL,
  `source_node_group_id` varchar(50) NOT NULL,
  `target_node_group_id` varchar(50) NOT NULL,
  `target_catalog_name` varchar(255) DEFAULT NULL,
  `target_schema_name` varchar(255) DEFAULT NULL,
  `target_table_name` varchar(255) DEFAULT NULL,
  `filter_on_update` smallint(6) NOT NULL DEFAULT '1',
  `filter_on_insert` smallint(6) NOT NULL DEFAULT '1',
  `filter_on_delete` smallint(6) NOT NULL DEFAULT '1',
  `before_write_script` mediumtext,
  `after_write_script` mediumtext,
  `batch_complete_script` mediumtext,
  `batch_commit_script` mediumtext,
  `batch_rollback_script` mediumtext,
  `handle_error_script` mediumtext,
  `create_time` datetime NOT NULL,
  `last_update_by` varchar(50) DEFAULT NULL,
  `last_update_time` datetime NOT NULL,
  `load_filter_order` int(11) NOT NULL DEFAULT '1',
  `fail_on_error` smallint(6) NOT NULL DEFAULT '0',
  PRIMARY KEY (`load_filter_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_load_filter`
--

DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_I_FOR_SYM_LD_FLTR_C4RG after insert on `c4rg0airv2`.`sym_load_filter`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, row_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_load_filter',                                                                                                                                            
                                      'I',                                                                                                                                                             
                                      22,                                                                                                                                             
                                      concat(
          cast(if(new.`load_filter_id` is null,'',concat('"',replace(replace(new.`load_filter_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`load_filter_type` is null,'',concat('"',replace(replace(new.`load_filter_type`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`source_node_group_id` is null,'',concat('"',replace(replace(new.`source_node_group_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`target_node_group_id` is null,'',concat('"',replace(replace(new.`target_node_group_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`target_catalog_name` is null,'',concat('"',replace(replace(new.`target_catalog_name`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`target_schema_name` is null,'',concat('"',replace(replace(new.`target_schema_name`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`target_table_name` is null,'',concat('"',replace(replace(new.`target_table_name`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`filter_on_update` is null,'',concat('"',cast(new.`filter_on_update` as char),'"')),',',
          if(new.`filter_on_insert` is null,'',concat('"',cast(new.`filter_on_insert` as char),'"')),',',
          if(new.`filter_on_delete` is null,'',concat('"',cast(new.`filter_on_delete` as char),'"')),',',
          cast(if(new.`before_write_script` is null,'',concat('"',replace(replace(new.`before_write_script`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`after_write_script` is null,'',concat('"',replace(replace(new.`after_write_script`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`batch_complete_script` is null,'',concat('"',replace(replace(new.`batch_complete_script`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`batch_commit_script` is null,'',concat('"',replace(replace(new.`batch_commit_script`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`batch_rollback_script` is null,'',concat('"',replace(replace(new.`batch_rollback_script`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`handle_error_script` is null,'',concat('"',replace(replace(new.`handle_error_script`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"')),',',
          if(new.`load_filter_order` is null,'',concat('"',cast(new.`load_filter_order` as char),'"')),',',
          if(new.`fail_on_error` is null,'',concat('"',cast(new.`fail_on_error` as char),'"'))                                                                                                                                                
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_U_FOR_SYM_LD_FLTR_C4RG after update on `c4rg0airv2`.`sym_load_filter`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                  DECLARE var_row_data mediumtext character set utf8;                                                                                                                                      
                                  DECLARE var_old_data mediumtext character set utf8;                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                   set var_row_data = concat(
          cast(if(new.`load_filter_id` is null,'',concat('"',replace(replace(new.`load_filter_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`load_filter_type` is null,'',concat('"',replace(replace(new.`load_filter_type`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`source_node_group_id` is null,'',concat('"',replace(replace(new.`source_node_group_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`target_node_group_id` is null,'',concat('"',replace(replace(new.`target_node_group_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`target_catalog_name` is null,'',concat('"',replace(replace(new.`target_catalog_name`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`target_schema_name` is null,'',concat('"',replace(replace(new.`target_schema_name`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`target_table_name` is null,'',concat('"',replace(replace(new.`target_table_name`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`filter_on_update` is null,'',concat('"',cast(new.`filter_on_update` as char),'"')),',',
          if(new.`filter_on_insert` is null,'',concat('"',cast(new.`filter_on_insert` as char),'"')),',',
          if(new.`filter_on_delete` is null,'',concat('"',cast(new.`filter_on_delete` as char),'"')),',',
          cast(if(new.`before_write_script` is null,'',concat('"',replace(replace(new.`before_write_script`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`after_write_script` is null,'',concat('"',replace(replace(new.`after_write_script`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`batch_complete_script` is null,'',concat('"',replace(replace(new.`batch_complete_script`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`batch_commit_script` is null,'',concat('"',replace(replace(new.`batch_commit_script`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`batch_rollback_script` is null,'',concat('"',replace(replace(new.`batch_rollback_script`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`handle_error_script` is null,'',concat('"',replace(replace(new.`handle_error_script`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"')),',',
          if(new.`load_filter_order` is null,'',concat('"',cast(new.`load_filter_order` as char),'"')),',',
          if(new.`fail_on_error` is null,'',concat('"',cast(new.`fail_on_error` as char),'"')));                                                                                                                              
                                   set var_old_data = concat(null);                                                                                                                           
                                   if 1=1 then                                                                                                                                  
                                        insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, row_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                        values(                                                                                                                                                           
                                          'sym_load_filter',                                                                                                                                           
                                          'U',                                                                                                                                                            
                                          22,                                                                                                                                            
                                          concat(
          cast(if(old.`load_filter_id` is null,'',concat('"',replace(replace(old.`load_filter_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                               
                                           ),                                                                                                                                                             
                                          var_row_data,                                                                                                                                                   
                                          var_old_data,                                                                                                                                                   
                                          'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                       
                                          null,                                                                                                                                              
                                          CURRENT_TIMESTAMP                                                                                                                                               
                                        );                                                                                                                                                                
                                    end if;                                                                                                                                                               
                                  end if;                                                                                                                                                                
                                                                                                                                                                                    
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_D_FOR_SYM_LD_FLTR_C4RG after delete on `c4rg0airv2`.`sym_load_filter`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_load_filter',                                                                                                                                            
                                      'D',                                                                                                                                                             
                                      22,                                                                                                                                             
                                      concat(
          cast(if(old.`load_filter_id` is null,'',concat('"',replace(replace(old.`load_filter_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                                
                                       ),                                                                                                                                                              
                                       concat(null                                                                                                                                            
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;

--
-- Table structure for table `sym_lock`
--

CREATE TABLE `sym_lock` (
  `lock_action` varchar(50) NOT NULL,
  `lock_type` varchar(50) NOT NULL,
  `locking_server_id` varchar(255) DEFAULT NULL,
  `lock_time` datetime DEFAULT NULL,
  `shared_count` int(11) NOT NULL DEFAULT '0',
  `shared_enable` int(11) NOT NULL DEFAULT '0',
  `last_lock_time` datetime DEFAULT NULL,
  `last_locking_server_id` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`lock_action`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_lock`
--


--
-- Table structure for table `sym_monitor`
--

CREATE TABLE `sym_monitor` (
  `monitor_id` varchar(128) NOT NULL,
  `node_group_id` varchar(50) NOT NULL DEFAULT 'ALL',
  `external_id` varchar(255) NOT NULL DEFAULT 'ALL',
  `type` varchar(50) NOT NULL,
  `expression` mediumtext,
  `threshold` bigint(20) NOT NULL DEFAULT '0',
  `run_period` int(11) NOT NULL DEFAULT '0',
  `run_count` int(11) NOT NULL DEFAULT '0',
  `severity_level` int(11) NOT NULL DEFAULT '0',
  `enabled` smallint(6) NOT NULL DEFAULT '0',
  `create_time` datetime DEFAULT NULL,
  `last_update_by` varchar(50) DEFAULT NULL,
  `last_update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`monitor_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_monitor`
--

DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_I_FOR_SYM_MNTR_C4RG after insert on `c4rg0airv2`.`sym_monitor`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, row_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_monitor',                                                                                                                                            
                                      'I',                                                                                                                                                             
                                      23,                                                                                                                                             
                                      concat(
          cast(if(new.`monitor_id` is null,'',concat('"',replace(replace(new.`monitor_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`node_group_id` is null,'',concat('"',replace(replace(new.`node_group_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`external_id` is null,'',concat('"',replace(replace(new.`external_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`type` is null,'',concat('"',replace(replace(new.`type`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`expression` is null,'',concat('"',replace(replace(new.`expression`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`threshold` is null,'',concat('"',cast(new.`threshold` as char),'"')),',',
          if(new.`run_period` is null,'',concat('"',cast(new.`run_period` as char),'"')),',',
          if(new.`run_count` is null,'',concat('"',cast(new.`run_count` as char),'"')),',',
          if(new.`severity_level` is null,'',concat('"',cast(new.`severity_level` as char),'"')),',',
          if(new.`enabled` is null,'',concat('"',cast(new.`enabled` as char),'"')),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"'))                                                                                                                                                
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_U_FOR_SYM_MNTR_C4RG after update on `c4rg0airv2`.`sym_monitor`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                  DECLARE var_row_data mediumtext character set utf8;                                                                                                                                      
                                  DECLARE var_old_data mediumtext character set utf8;                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                   set var_row_data = concat(
          cast(if(new.`monitor_id` is null,'',concat('"',replace(replace(new.`monitor_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`node_group_id` is null,'',concat('"',replace(replace(new.`node_group_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`external_id` is null,'',concat('"',replace(replace(new.`external_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`type` is null,'',concat('"',replace(replace(new.`type`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`expression` is null,'',concat('"',replace(replace(new.`expression`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`threshold` is null,'',concat('"',cast(new.`threshold` as char),'"')),',',
          if(new.`run_period` is null,'',concat('"',cast(new.`run_period` as char),'"')),',',
          if(new.`run_count` is null,'',concat('"',cast(new.`run_count` as char),'"')),',',
          if(new.`severity_level` is null,'',concat('"',cast(new.`severity_level` as char),'"')),',',
          if(new.`enabled` is null,'',concat('"',cast(new.`enabled` as char),'"')),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"')));                                                                                                                              
                                   set var_old_data = concat(null);                                                                                                                           
                                   if 1=1 then                                                                                                                                  
                                        insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, row_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                        values(                                                                                                                                                           
                                          'sym_monitor',                                                                                                                                           
                                          'U',                                                                                                                                                            
                                          23,                                                                                                                                            
                                          concat(
          cast(if(old.`monitor_id` is null,'',concat('"',replace(replace(old.`monitor_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                               
                                           ),                                                                                                                                                             
                                          var_row_data,                                                                                                                                                   
                                          var_old_data,                                                                                                                                                   
                                          'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                       
                                          null,                                                                                                                                              
                                          CURRENT_TIMESTAMP                                                                                                                                               
                                        );                                                                                                                                                                
                                    end if;                                                                                                                                                               
                                  end if;                                                                                                                                                                
                                                                                                                                                                                    
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_D_FOR_SYM_MNTR_C4RG after delete on `c4rg0airv2`.`sym_monitor`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_monitor',                                                                                                                                            
                                      'D',                                                                                                                                                             
                                      23,                                                                                                                                             
                                      concat(
          cast(if(old.`monitor_id` is null,'',concat('"',replace(replace(old.`monitor_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                                
                                       ),                                                                                                                                                              
                                       concat(null                                                                                                                                            
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;

--
-- Table structure for table `sym_monitor_event`
--

CREATE TABLE `sym_monitor_event` (
  `monitor_id` varchar(128) NOT NULL,
  `node_id` varchar(50) NOT NULL,
  `event_time` datetime NOT NULL,
  `host_name` varchar(60) DEFAULT NULL,
  `type` varchar(50) NOT NULL,
  `threshold` bigint(20) NOT NULL DEFAULT '0',
  `event_value` bigint(20) NOT NULL DEFAULT '0',
  `event_count` int(11) NOT NULL DEFAULT '0',
  `severity_level` int(11) NOT NULL DEFAULT '0',
  `is_resolved` smallint(6) NOT NULL DEFAULT '0',
  `is_notified` smallint(6) NOT NULL DEFAULT '0',
  `details` mediumtext,
  `last_update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`monitor_id`,`node_id`,`event_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_monitor_event`
--


--
-- Table structure for table `sym_node`
--

CREATE TABLE `sym_node` (
  `node_id` varchar(50) NOT NULL,
  `node_group_id` varchar(50) NOT NULL,
  `external_id` varchar(255) NOT NULL,
  `sync_enabled` smallint(6) DEFAULT '0',
  `sync_url` varchar(255) DEFAULT NULL,
  `schema_version` varchar(50) DEFAULT NULL,
  `symmetric_version` varchar(50) DEFAULT NULL,
  `config_version` varchar(50) DEFAULT NULL,
  `database_type` varchar(50) DEFAULT NULL,
  `database_version` varchar(50) DEFAULT NULL,
  `database_name` varchar(50) DEFAULT NULL,
  `batch_to_send_count` int(11) DEFAULT '0',
  `batch_in_error_count` int(11) DEFAULT '0',
  `created_at_node_id` varchar(50) DEFAULT NULL,
  `deployment_type` varchar(50) DEFAULT NULL,
  `deployment_sub_type` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`node_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_node`
--

INSERT INTO `sym_node` VALUES ('000','c4rgo','000',1,'http://217.182.66.168:31515/sync/c4rgo','?','3.12.4','3.12.4','MySQL','5.7','mysql',-1,-1,NULL,'server',NULL),('001','beta','001',1,'http://DESKTOP-8SVEEPF:31415/sync/beta-001','?','3.12.4','3.12.4','MySQL','5.7','mysql',-1,-1,'000','server',NULL);
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_I_FOR_SYM_ND_C4RG after insert on `c4rg0airv2`.`sym_node`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, row_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_node',                                                                                                                                            
                                      'I',                                                                                                                                                             
                                      16,                                                                                                                                             
                                      concat(
          cast(if(new.`node_id` is null,'',concat('"',replace(replace(new.`node_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`node_group_id` is null,'',concat('"',replace(replace(new.`node_group_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`external_id` is null,'',concat('"',replace(replace(new.`external_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`sync_enabled` is null,'',concat('"',cast(new.`sync_enabled` as char),'"')),',',
          cast(if(new.`sync_url` is null,'',concat('"',replace(replace(new.`sync_url`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`schema_version` is null,'',concat('"',replace(replace(new.`schema_version`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`symmetric_version` is null,'',concat('"',replace(replace(new.`symmetric_version`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`config_version` is null,'',concat('"',replace(replace(new.`config_version`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`database_type` is null,'',concat('"',replace(replace(new.`database_type`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`database_version` is null,'',concat('"',replace(replace(new.`database_version`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`database_name` is null,'',concat('"',replace(replace(new.`database_name`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`batch_to_send_count` is null,'',concat('"',cast(new.`batch_to_send_count` as char),'"')),',',
          if(new.`batch_in_error_count` is null,'',concat('"',cast(new.`batch_in_error_count` as char),'"')),',',
          cast(if(new.`created_at_node_id` is null,'',concat('"',replace(replace(new.`created_at_node_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`deployment_type` is null,'',concat('"',replace(replace(new.`deployment_type`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`deployment_sub_type` is null,'',concat('"',replace(replace(new.`deployment_sub_type`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                                
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_U_FOR_SYM_ND_C4RG after update on `c4rg0airv2`.`sym_node`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                  DECLARE var_row_data mediumtext character set utf8;                                                                                                                                      
                                  DECLARE var_old_data mediumtext character set utf8;                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                   set var_row_data = concat(
          cast(if(new.`node_id` is null,'',concat('"',replace(replace(new.`node_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`node_group_id` is null,'',concat('"',replace(replace(new.`node_group_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`external_id` is null,'',concat('"',replace(replace(new.`external_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`sync_enabled` is null,'',concat('"',cast(new.`sync_enabled` as char),'"')),',',
          cast(if(new.`sync_url` is null,'',concat('"',replace(replace(new.`sync_url`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`schema_version` is null,'',concat('"',replace(replace(new.`schema_version`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`symmetric_version` is null,'',concat('"',replace(replace(new.`symmetric_version`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`config_version` is null,'',concat('"',replace(replace(new.`config_version`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`database_type` is null,'',concat('"',replace(replace(new.`database_type`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`database_version` is null,'',concat('"',replace(replace(new.`database_version`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`database_name` is null,'',concat('"',replace(replace(new.`database_name`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`batch_to_send_count` is null,'',concat('"',cast(new.`batch_to_send_count` as char),'"')),',',
          if(new.`batch_in_error_count` is null,'',concat('"',cast(new.`batch_in_error_count` as char),'"')),',',
          cast(if(new.`created_at_node_id` is null,'',concat('"',replace(replace(new.`created_at_node_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`deployment_type` is null,'',concat('"',replace(replace(new.`deployment_type`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`deployment_sub_type` is null,'',concat('"',replace(replace(new.`deployment_sub_type`,'\\','\\\\'),'"','\\"'),'"')) as char));                                                                                                                              
                                   set var_old_data = concat(null);                                                                                                                           
                                   if 1=1 then                                                                                                                                  
                                        insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, row_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                        values(                                                                                                                                                           
                                          'sym_node',                                                                                                                                           
                                          'U',                                                                                                                                                            
                                          16,                                                                                                                                            
                                          concat(
          cast(if(old.`node_id` is null,'',concat('"',replace(replace(old.`node_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                               
                                           ),                                                                                                                                                             
                                          var_row_data,                                                                                                                                                   
                                          var_old_data,                                                                                                                                                   
                                          'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                       
                                          null,                                                                                                                                              
                                          CURRENT_TIMESTAMP                                                                                                                                               
                                        );                                                                                                                                                                
                                    end if;                                                                                                                                                               
                                  end if;                                                                                                                                                                
                                                                                                                                                                                    
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_D_FOR_SYM_ND_C4RG after delete on `c4rg0airv2`.`sym_node`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_node',                                                                                                                                            
                                      'D',                                                                                                                                                             
                                      16,                                                                                                                                             
                                      concat(
          cast(if(old.`node_id` is null,'',concat('"',replace(replace(old.`node_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                                
                                       ),                                                                                                                                                              
                                       concat(null                                                                                                                                            
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;

--
-- Table structure for table `sym_node_channel_ctl`
--

CREATE TABLE `sym_node_channel_ctl` (
  `node_id` varchar(50) NOT NULL,
  `channel_id` varchar(128) NOT NULL,
  `suspend_enabled` smallint(6) DEFAULT '0',
  `ignore_enabled` smallint(6) DEFAULT '0',
  `last_extract_time` datetime DEFAULT NULL,
  PRIMARY KEY (`node_id`,`channel_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_node_channel_ctl`
--


--
-- Table structure for table `sym_node_communication`
--

CREATE TABLE `sym_node_communication` (
  `node_id` varchar(50) NOT NULL,
  `queue` varchar(25) NOT NULL DEFAULT 'default',
  `communication_type` varchar(10) NOT NULL,
  `lock_time` datetime DEFAULT NULL,
  `locking_server_id` varchar(255) DEFAULT NULL,
  `last_lock_time` datetime DEFAULT NULL,
  `last_lock_millis` bigint(20) DEFAULT '0',
  `success_count` bigint(20) DEFAULT '0',
  `fail_count` bigint(20) DEFAULT '0',
  `skip_count` bigint(20) DEFAULT '0',
  `total_success_count` bigint(20) DEFAULT '0',
  `total_fail_count` bigint(20) DEFAULT '0',
  `total_success_millis` bigint(20) DEFAULT '0',
  `total_fail_millis` bigint(20) DEFAULT '0',
  `batch_to_send_count` bigint(20) DEFAULT '0',
  `node_priority` int(11) DEFAULT '0',
  PRIMARY KEY (`node_id`,`queue`,`communication_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_node_communication`
--


--
-- Table structure for table `sym_node_group`
--

CREATE TABLE `sym_node_group` (
  `node_group_id` varchar(50) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `last_update_by` varchar(50) DEFAULT NULL,
  `last_update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`node_group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sym_node_group`
--

INSERT INTO `sym_node_group` VALUES ('beta','Beta group',NULL,NULL,NULL),('c4rgo','C4rgo Group',NULL,NULL,NULL);
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_I_FOR_SYM_ND_GRP_C4RG after insert on `c4rg0airv2`.`sym_node_group`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, row_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_node_group',                                                                                                                                            
                                      'I',                                                                                                                                                             
                                      20,                                                                                                                                             
                                      concat(
          cast(if(new.`node_group_id` is null,'',concat('"',replace(replace(new.`node_group_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`description` is null,'',concat('"',replace(replace(new.`description`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"'))                                                                                                                                                
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_U_FOR_SYM_ND_GRP_C4RG after update on `c4rg0airv2`.`sym_node_group`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                  DECLARE var_row_data mediumtext character set utf8;                                                                                                                                      
                                  DECLARE var_old_data mediumtext character set utf8;                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                   set var_row_data = concat(
          cast(if(new.`node_group_id` is null,'',concat('"',replace(replace(new.`node_group_id`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          cast(if(new.`description` is null,'',concat('"',replace(replace(new.`description`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`create_time` is null,'',concat('"',cast(new.`create_time` as char),'"')),',',
          cast(if(new.`last_update_by` is null,'',concat('"',replace(replace(new.`last_update_by`,'\\','\\\\'),'"','\\"'),'"')) as char),',',
          if(new.`last_update_time` is null,'',concat('"',cast(new.`last_update_time` as char),'"')));                                                                                                                              
                                   set var_old_data = concat(null);                                                                                                                           
                                   if 1=1 then                                                                                                                                  
                                        insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, row_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                        values(                                                                                                                                                           
                                          'sym_node_group',                                                                                                                                           
                                          'U',                                                                                                                                                            
                                          20,                                                                                                                                            
                                          concat(
          cast(if(old.`node_group_id` is null,'',concat('"',replace(replace(old.`node_group_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                               
                                           ),                                                                                                                                                             
                                          var_row_data,                                                                                                                                                   
                                          var_old_data,                                                                                                                                                   
                                          'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                       
                                          null,                                                                                                                                              
                                          CURRENT_TIMESTAMP                                                                                                                                               
                                        );                                                                                                                                                                
                                    end if;                                                                                                                                                               
                                  end if;                                                                                                                                                                
                                                                                                                                                                                    
                                end */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`c4rgosync`@`localhost`*/ /*!50003 trigger SYM_ON_D_FOR_SYM_ND_GRP_C4RG after delete on `c4rg0airv2`.`sym_node_group`                                                                                                                                
                                for each row begin                                                                                                                                                     
                                   
                                  if 1=1 and 1=1 then                                                                                                 
                                    insert into `c4rg0airv2`.sym_data (table_name, event_type, trigger_hist_id, pk_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time)
                                    values(                                                                                                                                                            
                                      'sym_node_group',                                                                                                                                            
                                      'D',                                                                                                                                                             
                                      20,                                                                                                                                             
                                      concat(
          cast(if(old.`node_group_id` is null,'',concat('"',replace(replace(old.`node_group_id`,'\\','\\\\'),'"','\\"'),'"')) as char)                                                                                                                                                
                                       ),                                                                                                                                                              
                                       concat(null                                                                                                                                            
                                       ),                                                                                                                                                              
                                      'config', `c4rg0airv2`.sym_transaction_id_post_5_7_6(), @sync_node_disabled,                                                                                                        
                                      null,                                                                                                                                               
                                      CURRENT_TIMESTAMP                                                                                                                                                
                                    );                                                                                                                                                                 
                                  end if;                                                                                                                                                              
                                                                                                                                                                                  
                                end */;;
DELIMITER ;

--
