Fixed SQL migration scripts
This commit is contained in:
parent
d091ee8194
commit
62b52b901a
|
@ -48,6 +48,38 @@ INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
|||
WHERE `trecon_task`.`type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_threads_', 'custom', 1, 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_useProxy_', 'custom', 0, 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_proxyUrl_', 'custom', '', 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_sslCheck_', 'custom', 0, 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
SET @position = 4;
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
|
|
|
@ -46,6 +46,30 @@ INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES
|
|||
INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES ('', @id_app, ''_exec1_' --conf '_tempfileConf_' --target_databases '_tempfileTargetDatabases_' --target_agents '_tempfileTargetAgents_' --custom_queries '_tempfileCustomQueries_'');
|
||||
|
||||
-- Migrate current RDS tasks configurations
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_tentacleIP_', 'custom', '127.0.0.1', 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_tentaclePort_', 'custom', '41121', 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_tentacleExtraOpt_', 'custom', '', 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
|
@ -54,6 +78,38 @@ INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
|||
WHERE `trecon_task`.`type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_threads_', 'custom', 1, 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_useProxy_', 'custom', 0, 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_proxyUrl_', 'custom', '', 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_sslCheck_', 'custom', 0, 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
|
@ -405,7 +461,7 @@ INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
|||
SELECT
|
||||
`id_rt`, '_threads_', 'custom', '1', 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type AND `id_app` = @id_app_mysql
|
||||
WHERE `type` = @current_app_type AND `id_app` = @id_app_oracle
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
|
@ -413,7 +469,7 @@ INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
|||
SELECT
|
||||
`id_rt`, '_engineAgent_', 'custom', '', 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type AND `id_app` = @id_app_mysql
|
||||
WHERE `type` = @current_app_type AND `id_app` = @id_app_oracle
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
|
@ -521,14 +577,6 @@ INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
|||
;
|
||||
|
||||
-- Migrate current RDS tasks
|
||||
UPDATE `trecon_task`
|
||||
SET
|
||||
`id_app` = @id_app,
|
||||
`setup_complete` = 1,
|
||||
`type` = 15
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
UPDATE `trecon_task`
|
||||
SET
|
||||
`setup_complete` = 1,
|
||||
|
@ -541,4 +589,12 @@ UPDATE `trecon_task`
|
|||
`setup_complete` = 1,
|
||||
`type` = 15
|
||||
WHERE `type` = @current_app_type AND `id_app` = @id_app_oracle
|
||||
;
|
||||
|
||||
UPDATE `trecon_task`
|
||||
SET
|
||||
`id_app` = @id_app,
|
||||
`setup_complete` = 1,
|
||||
`type` = 15
|
||||
WHERE `type` = @current_app_type AND `id_app` IS NULL
|
||||
;
|
|
@ -48,6 +48,38 @@ INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
|||
WHERE `trecon_task`.`type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_threads_', 'custom', 1, 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_useProxy_', 'custom', 0, 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_proxyUrl_', 'custom', '', 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_sslCheck_', 'custom', 0, 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
SET @position = 3;
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
|
|
|
@ -487,6 +487,30 @@ INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
|||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_useProxy_', 'custom', 0, 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_proxyUrl_', 'custom', '', 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_sslCheck_', 'custom', 0, 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
|
@ -674,7 +698,7 @@ INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
|||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, 'agents_group_name=__taskGroup__
threads=_threads_
interval=__taskInterval__
transfer_mode=tentacle
tentacle_ip=_tentacleIP_
tentacle_port=_tentaclePort_
tentacle_opts=_tentacleExtraOpt_
advance_monitoring=_azureMCInstanceSummary_
cpu_summary=_azureMCCpuPerfSummary_
iops_summary=_azureMCIopsPerfSummary_
disk_summary=_azureMCDiskPerfSummary_
network_summary=_azureMCNetworkPerfSummary_
azure_zones=_azureMCZones_
azure_instances=_azureMCInstance_
creds_b64=_credentials_
stats_agent=_statsAgent_
stats_agent_name=_statsAgentName_', 1
|
||||
`id_rt`, '_tempfileAzureMC_', 'custom', 'agents_group_name=__taskGroup__
threads=_threads_
interval=__taskInterval__
transfer_mode=tentacle
tentacle_ip=_tentacleIP_
tentacle_port=_tentaclePort_
tentacle_opts=_tentacleExtraOpt_
advance_monitoring=_azureMCInstanceSummary_
cpu_summary=_azureMCCpuPerfSummary_
iops_summary=_azureMCIopsPerfSummary_
disk_summary=_azureMCDiskPerfSummary_
network_summary=_azureMCNetworkPerfSummary_
azure_zones=_azureMCZones_
azure_instances=_azureMCInstance_
creds_b64=_credentials_
stats_agent=_statsAgent_
stats_agent_name=_statsAgentName_', 1
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
|
|
@ -671,6 +671,30 @@ INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
|||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_useProxy_', 'custom', 0, 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_proxyUrl_', 'custom', '', 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_sslCheck_', 'custom', 0, 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
|
|
|
@ -16,20 +16,12 @@ INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES
|
|||
INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' --conf '_tempfileConf_' --custom_modules '_tempfileCustomModules_'');
|
||||
|
||||
-- Migrate current SAP tasks configurations
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_group_', 'agent_groups', `id_group`, 0
|
||||
FROM `trecon_task`
|
||||
WHERE `trecon_task`.`type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_server_', 'custom', `subnet`, 0
|
||||
FROM `trecon_task`
|
||||
WHERE `trecon_task`.`type` = @current_app_type
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
|
@ -37,7 +29,7 @@ INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
|||
SELECT
|
||||
`id_rt`, '_sapClient_', 'custom', `field3`, 0
|
||||
FROM `trecon_task`
|
||||
WHERE `trecon_task`.`type` = @current_app_type
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
|
@ -45,7 +37,7 @@ INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
|||
SELECT
|
||||
`id_rt`, '_sapSystem_', 'custom', `field2`, 0
|
||||
FROM `trecon_task`
|
||||
WHERE `trecon_task`.`type` = @current_app_type
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
|
@ -53,7 +45,7 @@ INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
|||
SELECT
|
||||
`id_rt`, '_sapLicense_', 'custom', `field4`, 0
|
||||
FROM `trecon_task`
|
||||
WHERE `trecon_task`.`type` = @current_app_type
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
|
@ -61,13 +53,13 @@ INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
|||
SELECT
|
||||
`id_rt`, '_credentials_', 'credentials.sap', `auth_strings`, 0
|
||||
FROM `trecon_task`
|
||||
WHERE `trecon_task`.`type` = @current_app_type
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
(`id_task`, `macro`, `type`, `value`, `temp_conf`)
|
||||
SELECT
|
||||
`id_rt`, '_threads_', 'custom', '1', 0
|
||||
`id_rt`, '_threads_', 'custom', 1, 0
|
||||
FROM `trecon_task`
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
@ -85,7 +77,7 @@ INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
|||
SELECT
|
||||
`id_rt`, '_targetAgent_', 'custom', '', 0
|
||||
FROM `trecon_task`
|
||||
WHERE `trecon_task`.`type` = @current_app_type
|
||||
WHERE `type` = @current_app_type
|
||||
;
|
||||
|
||||
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
||||
|
@ -166,7 +158,7 @@ INSERT IGNORE INTO `tdiscovery_apps_tasks_macros`
|
|||
;
|
||||
|
||||
SET @position = -1;
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `trecon_task` AS `main_trecon_task`
|
||||
SET `tdiscovery_apps_tasks_macros`.`value` = JSON_MERGE(
|
||||
`value`,
|
||||
(
|
||||
|
@ -231,17 +223,17 @@ UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
|||
FROM `trecon_task`
|
||||
WHERE
|
||||
`trecon_task`.`type` = @current_app_type AND
|
||||
`trecon_task`.`id_rt` = `tdiscovery_apps_tasks`.`id_task`
|
||||
`trecon_task`.`id_rt` = `main_trecon_task`.`id_rt`
|
||||
)
|
||||
)
|
||||
WHERE
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `tdiscovery_apps_tasks`.`id_task` AND
|
||||
`tdiscovery_apps_tasks`.`id_app` = @id_app AND
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `main_trecon_task`.`id_rt` AND
|
||||
`main_trecon_task`.`type` = @current_app_type AND
|
||||
`tdiscovery_apps_tasks_macros`.`macro` = '_customModules_'
|
||||
;
|
||||
|
||||
SET @position = -2;
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `trecon_task` AS `main_trecon_task`
|
||||
SET `tdiscovery_apps_tasks_macros`.`value` = JSON_MERGE(
|
||||
`value`,
|
||||
(
|
||||
|
@ -306,17 +298,17 @@ UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
|||
FROM `trecon_task`
|
||||
WHERE
|
||||
`trecon_task`.`type` = @current_app_type AND
|
||||
`trecon_task`.`id_rt` = `tdiscovery_apps_tasks`.`id_task`
|
||||
`trecon_task`.`id_rt` = `main_trecon_task`.`id_rt`
|
||||
)
|
||||
)
|
||||
WHERE
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `tdiscovery_apps_tasks`.`id_task` AND
|
||||
`tdiscovery_apps_tasks`.`id_app` = @id_app AND
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `main_trecon_task`.`id_rt` AND
|
||||
`main_trecon_task`.`type` = @current_app_type AND
|
||||
`tdiscovery_apps_tasks_macros`.`macro` = '_customModules_'
|
||||
;
|
||||
|
||||
SET @position = -3;
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `trecon_task` AS `main_trecon_task`
|
||||
SET `tdiscovery_apps_tasks_macros`.`value` = JSON_MERGE(
|
||||
`value`,
|
||||
(
|
||||
|
@ -381,17 +373,17 @@ UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
|||
FROM `trecon_task`
|
||||
WHERE
|
||||
`trecon_task`.`type` = @current_app_type AND
|
||||
`trecon_task`.`id_rt` = `tdiscovery_apps_tasks`.`id_task`
|
||||
`trecon_task`.`id_rt` = `main_trecon_task`.`id_rt`
|
||||
)
|
||||
)
|
||||
WHERE
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `tdiscovery_apps_tasks`.`id_task` AND
|
||||
`tdiscovery_apps_tasks`.`id_app` = @id_app AND
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `main_trecon_task`.`id_rt` AND
|
||||
`main_trecon_task`.`type` = @current_app_type AND
|
||||
`tdiscovery_apps_tasks_macros`.`macro` = '_customModules_'
|
||||
;
|
||||
|
||||
SET @position = -4;
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `trecon_task` AS `main_trecon_task`
|
||||
SET `tdiscovery_apps_tasks_macros`.`value` = JSON_MERGE(
|
||||
`value`,
|
||||
(
|
||||
|
@ -456,17 +448,17 @@ UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
|||
FROM `trecon_task`
|
||||
WHERE
|
||||
`trecon_task`.`type` = @current_app_type AND
|
||||
`trecon_task`.`id_rt` = `tdiscovery_apps_tasks`.`id_task`
|
||||
`trecon_task`.`id_rt` = `main_trecon_task`.`id_rt`
|
||||
)
|
||||
)
|
||||
WHERE
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `tdiscovery_apps_tasks`.`id_task` AND
|
||||
`tdiscovery_apps_tasks`.`id_app` = @id_app AND
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `main_trecon_task`.`id_rt` AND
|
||||
`main_trecon_task`.`type` = @current_app_type AND
|
||||
`tdiscovery_apps_tasks_macros`.`macro` = '_customModules_'
|
||||
;
|
||||
|
||||
SET @position = -5;
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `trecon_task` AS `main_trecon_task`
|
||||
SET `tdiscovery_apps_tasks_macros`.`value` = JSON_MERGE(
|
||||
`value`,
|
||||
(
|
||||
|
@ -531,17 +523,17 @@ UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
|||
FROM `trecon_task`
|
||||
WHERE
|
||||
`trecon_task`.`type` = @current_app_type AND
|
||||
`trecon_task`.`id_rt` = `tdiscovery_apps_tasks`.`id_task`
|
||||
`trecon_task`.`id_rt` = `main_trecon_task`.`id_rt`
|
||||
)
|
||||
)
|
||||
WHERE
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `tdiscovery_apps_tasks`.`id_task` AND
|
||||
`tdiscovery_apps_tasks`.`id_app` = @id_app AND
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `main_trecon_task`.`id_rt` AND
|
||||
`main_trecon_task`.`type` = @current_app_type AND
|
||||
`tdiscovery_apps_tasks_macros`.`macro` = '_customModules_'
|
||||
;
|
||||
|
||||
SET @position = -6;
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `trecon_task` AS `main_trecon_task`
|
||||
SET `tdiscovery_apps_tasks_macros`.`value` = JSON_MERGE(
|
||||
`value`,
|
||||
(
|
||||
|
@ -606,17 +598,17 @@ UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
|||
FROM `trecon_task`
|
||||
WHERE
|
||||
`trecon_task`.`type` = @current_app_type AND
|
||||
`trecon_task`.`id_rt` = `tdiscovery_apps_tasks`.`id_task`
|
||||
`trecon_task`.`id_rt` = `main_trecon_task`.`id_rt`
|
||||
)
|
||||
)
|
||||
WHERE
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `tdiscovery_apps_tasks`.`id_task` AND
|
||||
`tdiscovery_apps_tasks`.`id_app` = @id_app AND
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `main_trecon_task`.`id_rt` AND
|
||||
`main_trecon_task`.`type` = @current_app_type AND
|
||||
`tdiscovery_apps_tasks_macros`.`macro` = '_customModules_'
|
||||
;
|
||||
|
||||
SET @position = -7;
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `trecon_task` AS `main_trecon_task`
|
||||
SET `tdiscovery_apps_tasks_macros`.`value` = JSON_MERGE(
|
||||
`value`,
|
||||
(
|
||||
|
@ -681,17 +673,17 @@ UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
|||
FROM `trecon_task`
|
||||
WHERE
|
||||
`trecon_task`.`type` = @current_app_type AND
|
||||
`trecon_task`.`id_rt` = `tdiscovery_apps_tasks`.`id_task`
|
||||
`trecon_task`.`id_rt` = `main_trecon_task`.`id_rt`
|
||||
)
|
||||
)
|
||||
WHERE
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `tdiscovery_apps_tasks`.`id_task` AND
|
||||
`tdiscovery_apps_tasks`.`id_app` = @id_app AND
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `main_trecon_task`.`id_rt` AND
|
||||
`main_trecon_task`.`type` = @current_app_type AND
|
||||
`tdiscovery_apps_tasks_macros`.`macro` = '_customModules_'
|
||||
;
|
||||
|
||||
SET @position = -8;
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `trecon_task` AS `main_trecon_task`
|
||||
SET `tdiscovery_apps_tasks_macros`.`value` = JSON_MERGE(
|
||||
`value`,
|
||||
(
|
||||
|
@ -756,17 +748,17 @@ UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
|||
FROM `trecon_task`
|
||||
WHERE
|
||||
`trecon_task`.`type` = @current_app_type AND
|
||||
`trecon_task`.`id_rt` = `tdiscovery_apps_tasks`.`id_task`
|
||||
`trecon_task`.`id_rt` = `main_trecon_task`.`id_rt`
|
||||
)
|
||||
)
|
||||
WHERE
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `tdiscovery_apps_tasks`.`id_task` AND
|
||||
`tdiscovery_apps_tasks`.`id_app` = @id_app AND
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `main_trecon_task`.`id_rt` AND
|
||||
`main_trecon_task`.`type` = @current_app_type AND
|
||||
`tdiscovery_apps_tasks_macros`.`macro` = '_customModules_'
|
||||
;
|
||||
|
||||
SET @position = -9;
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `trecon_task` AS `main_trecon_task`
|
||||
SET `tdiscovery_apps_tasks_macros`.`value` = JSON_MERGE(
|
||||
`value`,
|
||||
(
|
||||
|
@ -831,17 +823,17 @@ UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
|||
FROM `trecon_task`
|
||||
WHERE
|
||||
`trecon_task`.`type` = @current_app_type AND
|
||||
`trecon_task`.`id_rt` = `tdiscovery_apps_tasks`.`id_task`
|
||||
`trecon_task`.`id_rt` = `main_trecon_task`.`id_rt`
|
||||
)
|
||||
)
|
||||
WHERE
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `tdiscovery_apps_tasks`.`id_task` AND
|
||||
`tdiscovery_apps_tasks`.`id_app` = @id_app AND
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `main_trecon_task`.`id_rt` AND
|
||||
`main_trecon_task`.`type` = @current_app_type AND
|
||||
`tdiscovery_apps_tasks_macros`.`macro` = '_customModules_'
|
||||
;
|
||||
|
||||
SET @position = -10;
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `trecon_task` AS `main_trecon_task`
|
||||
SET `tdiscovery_apps_tasks_macros`.`value` = JSON_MERGE(
|
||||
`value`,
|
||||
(
|
||||
|
@ -906,17 +898,17 @@ UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
|||
FROM `trecon_task`
|
||||
WHERE
|
||||
`trecon_task`.`type` = @current_app_type AND
|
||||
`trecon_task`.`id_rt` = `tdiscovery_apps_tasks`.`id_task`
|
||||
`trecon_task`.`id_rt` = `main_trecon_task`.`id_rt`
|
||||
)
|
||||
)
|
||||
WHERE
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `tdiscovery_apps_tasks`.`id_task` AND
|
||||
`tdiscovery_apps_tasks`.`id_app` = @id_app AND
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `main_trecon_task`.`id_rt` AND
|
||||
`main_trecon_task`.`type` = @current_app_type AND
|
||||
`tdiscovery_apps_tasks_macros`.`macro` = '_customModules_'
|
||||
;
|
||||
|
||||
SET @position = -11;
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `trecon_task` AS `main_trecon_task`
|
||||
SET `tdiscovery_apps_tasks_macros`.`value` = JSON_MERGE(
|
||||
`value`,
|
||||
(
|
||||
|
@ -981,17 +973,17 @@ UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
|||
FROM `trecon_task`
|
||||
WHERE
|
||||
`trecon_task`.`type` = @current_app_type AND
|
||||
`trecon_task`.`id_rt` = `tdiscovery_apps_tasks`.`id_task`
|
||||
`trecon_task`.`id_rt` = `main_trecon_task`.`id_rt`
|
||||
)
|
||||
)
|
||||
WHERE
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `tdiscovery_apps_tasks`.`id_task` AND
|
||||
`tdiscovery_apps_tasks`.`id_app` = @id_app AND
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `main_trecon_task`.`id_rt` AND
|
||||
`main_trecon_task`.`type` = @current_app_type AND
|
||||
`tdiscovery_apps_tasks_macros`.`macro` = '_customModules_'
|
||||
;
|
||||
|
||||
SET @position = -12;
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `trecon_task` AS `main_trecon_task`
|
||||
SET `tdiscovery_apps_tasks_macros`.`value` = JSON_MERGE(
|
||||
`value`,
|
||||
(
|
||||
|
@ -1056,17 +1048,17 @@ UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
|||
FROM `trecon_task`
|
||||
WHERE
|
||||
`trecon_task`.`type` = @current_app_type AND
|
||||
`trecon_task`.`id_rt` = `tdiscovery_apps_tasks`.`id_task`
|
||||
`trecon_task`.`id_rt` = `main_trecon_task`.`id_rt`
|
||||
)
|
||||
)
|
||||
WHERE
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `tdiscovery_apps_tasks`.`id_task` AND
|
||||
`tdiscovery_apps_tasks`.`id_app` = @id_app AND
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `main_trecon_task`.`id_rt` AND
|
||||
`main_trecon_task`.`type` = @current_app_type AND
|
||||
`tdiscovery_apps_tasks_macros`.`macro` = '_customModules_'
|
||||
;
|
||||
|
||||
SET @position = -13;
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `trecon_task` AS `main_trecon_task`
|
||||
SET `tdiscovery_apps_tasks_macros`.`value` = JSON_MERGE(
|
||||
`value`,
|
||||
(
|
||||
|
@ -1131,17 +1123,17 @@ UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
|||
FROM `trecon_task`
|
||||
WHERE
|
||||
`trecon_task`.`type` = @current_app_type AND
|
||||
`trecon_task`.`id_rt` = `tdiscovery_apps_tasks`.`id_task`
|
||||
`trecon_task`.`id_rt` = `main_trecon_task`.`id_rt`
|
||||
)
|
||||
)
|
||||
WHERE
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `tdiscovery_apps_tasks`.`id_task` AND
|
||||
`tdiscovery_apps_tasks`.`id_app` = @id_app AND
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `main_trecon_task`.`id_rt` AND
|
||||
`main_trecon_task`.`type` = @current_app_type AND
|
||||
`tdiscovery_apps_tasks_macros`.`macro` = '_customModules_'
|
||||
;
|
||||
|
||||
SET @position = -14;
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `trecon_task` AS `main_trecon_task`
|
||||
SET `tdiscovery_apps_tasks_macros`.`value` = JSON_MERGE(
|
||||
`value`,
|
||||
(
|
||||
|
@ -1206,42 +1198,42 @@ UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
|||
FROM `trecon_task`
|
||||
WHERE
|
||||
`trecon_task`.`type` = @current_app_type AND
|
||||
`trecon_task`.`id_rt` = `tdiscovery_apps_tasks`.`id_task`
|
||||
`trecon_task`.`id_rt` = `main_trecon_task`.`id_rt`
|
||||
)
|
||||
)
|
||||
WHERE
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `tdiscovery_apps_tasks`.`id_task` AND
|
||||
`tdiscovery_apps_tasks`.`id_app` = @id_app AND
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `main_trecon_task`.`id_rt` AND
|
||||
`main_trecon_task`.`type` = @current_app_type AND
|
||||
`tdiscovery_apps_tasks_macros`.`macro` = '_customModules_'
|
||||
;
|
||||
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `trecon_task`
|
||||
SET
|
||||
`tdiscovery_apps_tasks_macros`.`value` = REPLACE(REPLACE(REPLACE(`value`, '"", ', ''), '""', ''), ', ]', ']')
|
||||
WHERE
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `tdiscovery_apps_tasks`.`id_task` AND
|
||||
`tdiscovery_apps_tasks`.`id_app` = @id_app AND
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `trecon_task`.`id_rt` AND
|
||||
`trecon_task`.`type` = @current_app_type AND
|
||||
`tdiscovery_apps_tasks_macros`.`macro` = '_customModules_'
|
||||
;
|
||||
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `trecon_task`
|
||||
SET
|
||||
`tdiscovery_apps_tasks_macros`.`value` = (
|
||||
SELECT `tconfig`.`value` FROM `tconfig` WHERE `tconfig`.`token` = 'sap_license'
|
||||
)
|
||||
WHERE
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `tdiscovery_apps_tasks`.`id_task` AND
|
||||
`tdiscovery_apps_tasks`.`id_app` = @id_app AND
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `trecon_task`.`id_rt` AND
|
||||
`trecon_task`.`type` = @current_app_type AND
|
||||
`tdiscovery_apps_tasks_macros`.`macro` = '_sapLicense_' AND
|
||||
`tdiscovery_apps_tasks_macros`.`value` = ''
|
||||
;
|
||||
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `tdiscovery_apps_tasks`
|
||||
UPDATE `tdiscovery_apps_tasks_macros`, `trecon_task`
|
||||
SET
|
||||
`tdiscovery_apps_tasks_macros`.`value` = 'trial'
|
||||
WHERE
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `tdiscovery_apps_tasks`.`id_task` AND
|
||||
`tdiscovery_apps_tasks`.`id_app` = @id_app AND
|
||||
`tdiscovery_apps_tasks_macros`.`id_task` = `trecon_task`.`id_rt` AND
|
||||
`trecon_task`.`type` = @current_app_type AND
|
||||
`tdiscovery_apps_tasks_macros`.`macro` = '_sapLicense_' AND
|
||||
`tdiscovery_apps_tasks_macros`.`value` = ''
|
||||
;
|
||||
|
|
Loading…
Reference in New Issue