mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
Schema update to avoid using JSON columns until internal CICD is updated
This commit is contained in:
parent
696c59b258
commit
18b1a1e14e
@ -35,16 +35,23 @@ CREATE TABLE IF NOT EXISTS `tncm_template_scripts` (
|
|||||||
FOREIGN KEY (`id_script`) REFERENCES `tncm_script`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
|
FOREIGN KEY (`id_script`) REFERENCES `tncm_script`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `tncm_agent_templates` (
|
CREATE TABLE IF NOT EXISTS `tncm_agent` (
|
||||||
`id` serial,
|
|
||||||
`id_agent` int(10) unsigned NOT NULL,
|
`id_agent` int(10) unsigned NOT NULL,
|
||||||
`id_template` bigint(20) unsigned NOT NULL,
|
`vendor` text,
|
||||||
|
`model` text,
|
||||||
`protocol` int unsigned not null default 0,
|
`protocol` int unsigned not null default 0,
|
||||||
`cred_key` varchar(100),
|
`cred_key` varchar(100),
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id_agent`),
|
||||||
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`) ON UPDATE CASCADE ON DELETE CASCADE,
|
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||||
FOREIGN KEY (`id_template`) REFERENCES `tncm_template`(`id`) ON UPDATE CASCADE ON DELETE CASCADE,
|
|
||||||
FOREIGN KEY (`cred_key`) REFERENCES `tcredential_store`(`identifier`) ON UPDATE CASCADE ON DELETE SET NULL
|
FOREIGN KEY (`cred_key`) REFERENCES `tcredential_store`(`identifier`) ON UPDATE CASCADE ON DELETE SET NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `tncm_agent_templates` (
|
||||||
|
`id_agent` int(10) unsigned NOT NULL,
|
||||||
|
`id_template` bigint(20) unsigned NOT NULL,
|
||||||
|
PRIMARY KEY (`id_agent`, `id_template`),
|
||||||
|
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||||
|
FOREIGN KEY (`id_template`) REFERENCES `tncm_template`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
@ -4122,17 +4122,27 @@ CREATE TABLE IF NOT EXISTS `tncm_template_scripts` (
|
|||||||
FOREIGN KEY (`id_script`) REFERENCES `tncm_script`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
|
FOREIGN KEY (`id_script`) REFERENCES `tncm_script`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ----------------------------------------------------------------------
|
||||||
|
-- Table `tncm_agents`
|
||||||
|
-- ----------------------------------------------------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS `tncm_agent` (
|
||||||
|
`id_agent` int(10) unsigned NOT NULL,
|
||||||
|
`vendor` text,
|
||||||
|
`model` text,
|
||||||
|
`protocol` int unsigned not null default 0,
|
||||||
|
`cred_key` varchar(100),
|
||||||
|
PRIMARY KEY (`id_agent`),
|
||||||
|
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||||
|
FOREIGN KEY (`cred_key`) REFERENCES `tcredential_store`(`identifier`) ON UPDATE CASCADE ON DELETE SET NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- ----------------------------------------------------------------------
|
-- ----------------------------------------------------------------------
|
||||||
-- Table `tncm_agent_templates`
|
-- Table `tncm_agent_templates`
|
||||||
-- ----------------------------------------------------------------------
|
-- ----------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tncm_agent_templates` (
|
CREATE TABLE IF NOT EXISTS `tncm_agent_templates` (
|
||||||
`id` serial,
|
|
||||||
`id_agent` int(10) unsigned NOT NULL,
|
`id_agent` int(10) unsigned NOT NULL,
|
||||||
`id_template` bigint(20) unsigned NOT NULL,
|
`id_template` bigint(20) unsigned NOT NULL,
|
||||||
`protocol` int unsigned not null default 0,
|
PRIMARY KEY (`id_agent`, `id_template`),
|
||||||
`cred_key` varchar(100),
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`) ON UPDATE CASCADE ON DELETE CASCADE,
|
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||||
FOREIGN KEY (`id_template`) REFERENCES `tncm_template`(`id`) ON UPDATE CASCADE ON DELETE CASCADE,
|
FOREIGN KEY (`id_template`) REFERENCES `tncm_template`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
|
||||||
FOREIGN KEY (`cred_key`) REFERENCES `tcredential_store`(`identifier`) ON UPDATE CASCADE ON DELETE SET NULL
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
@ -4030,8 +4030,8 @@ CREATE TABLE IF NOT EXISTS `tsync_queue` (
|
|||||||
-- ----------------------------------------------------------------------
|
-- ----------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tncm_template` (
|
CREATE TABLE IF NOT EXISTS `tncm_template` (
|
||||||
`id` serial,
|
`id` serial,
|
||||||
`vendor` json,
|
`vendor` text,
|
||||||
`model` json,
|
`model` text,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user