diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index 61653a12ad..9f9e857965 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -20,13 +20,14 @@ CREATE TABLE `tremote_command` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `tremote_command_target` ( - `rcmd_id` SERIAL, + `id` SERIAL, + `rcmd_id` bigint unsigned NOT NULL unique, `id_agente` int(10) unsigned NOT NULL, `utimestamp` int(20) unsigned NOT NULL default 0, `stdout` text, `stderr` text, `errorlevel` int(10) unsigned NOT NULL default 0, - PRIMARY KEY (`rcmd_id`), + PRIMARY KEY (`id`), FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 0a2cfdefb4..d72c908400 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -2319,13 +2319,14 @@ CREATE TABLE `tremote_command` ( -- Table `tremote_command_target` -- ---------------------------------------------------------------------- CREATE TABLE `tremote_command_target` ( - `rcmd_id` SERIAL, + `id` SERIAL, + `rcmd_id` bigint unsigned NOT NULL unique, `id_agente` int(10) unsigned NOT NULL, `utimestamp` int(20) unsigned NOT NULL default 0, `stdout` text, `stderr` text, `errorlevel` int(10) unsigned NOT NULL default 0, - PRIMARY KEY (`rcmd_id`), + PRIMARY KEY (`id`), FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 59ee15dd62..61eab5f300 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -3678,13 +3678,14 @@ CREATE TABLE `tremote_command` ( -- Table `tremote_command_target` -- ---------------------------------------------------------------------- CREATE TABLE `tremote_command_target` ( - `rcmd_id` SERIAL, + `id` SERIAL, + `rcmd_id` bigint unsigned NOT NULL unique, `id_agente` int(10) unsigned NOT NULL, `utimestamp` int(20) unsigned NOT NULL default 0, `stdout` text, `stderr` text, `errorlevel` int(10) unsigned NOT NULL default 0, - PRIMARY KEY (`rcmd_id`), + PRIMARY KEY (`id`), FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file