fixed error bbdd

This commit is contained in:
Daniel Barbero Martin 2019-10-30 14:43:10 +01:00
parent b7710a6562
commit d37410ed8c
3 changed files with 9 additions and 6 deletions

View File

@ -20,13 +20,14 @@ CREATE TABLE `tremote_command` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE 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, `id_agente` int(10) unsigned NOT NULL,
`utimestamp` int(20) unsigned NOT NULL default 0, `utimestamp` int(20) unsigned NOT NULL default 0,
`stdout` text, `stdout` text,
`stderr` text, `stderr` text,
`errorlevel` int(10) unsigned NOT NULL default 0, `errorlevel` int(10) unsigned NOT NULL default 0,
PRIMARY KEY (`rcmd_id`), PRIMARY KEY (`id`),
FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`) FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`)
ON UPDATE CASCADE ON DELETE CASCADE ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@ -2319,13 +2319,14 @@ CREATE TABLE `tremote_command` (
-- Table `tremote_command_target` -- Table `tremote_command_target`
-- ---------------------------------------------------------------------- -- ----------------------------------------------------------------------
CREATE 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, `id_agente` int(10) unsigned NOT NULL,
`utimestamp` int(20) unsigned NOT NULL default 0, `utimestamp` int(20) unsigned NOT NULL default 0,
`stdout` text, `stdout` text,
`stderr` text, `stderr` text,
`errorlevel` int(10) unsigned NOT NULL default 0, `errorlevel` int(10) unsigned NOT NULL default 0,
PRIMARY KEY (`rcmd_id`), PRIMARY KEY (`id`),
FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`) FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`)
ON UPDATE CASCADE ON DELETE CASCADE ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@ -3678,13 +3678,14 @@ CREATE TABLE `tremote_command` (
-- Table `tremote_command_target` -- Table `tremote_command_target`
-- ---------------------------------------------------------------------- -- ----------------------------------------------------------------------
CREATE 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, `id_agente` int(10) unsigned NOT NULL,
`utimestamp` int(20) unsigned NOT NULL default 0, `utimestamp` int(20) unsigned NOT NULL default 0,
`stdout` text, `stdout` text,
`stderr` text, `stderr` text,
`errorlevel` int(10) unsigned NOT NULL default 0, `errorlevel` int(10) unsigned NOT NULL default 0,
PRIMARY KEY (`rcmd_id`), PRIMARY KEY (`id`),
FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`) FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`)
ON UPDATE CASCADE ON DELETE CASCADE ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;