2011-05-09 Miguel de Dios <miguel.dedios@artica.es>

* pandoradb.sql, pandoradb.postgreSQL.sql: fixed the default value for
	timestamp, there was a own mistake in the order of date, sorry.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4321 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2011-05-09 15:10:31 +00:00
parent fc35eb06a7
commit cd3a886940
3 changed files with 32 additions and 27 deletions

View File

@ -1,3 +1,8 @@
2011-05-09 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql: fixed the default value for
timestamp, there was a own mistake in the order of date, sorry.
2011-05-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php: changed in the function

View File

@ -49,13 +49,13 @@ CREATE TABLE "tagente" (
"direccion" varchar(100) default NULL,
"comentarios" varchar(255) default '',
"id_grupo" INTEGER NOT NULL default 0,
"ultimo_contacto" TIMESTAMP without time zone default '01-01-1970 00:00:00',
"ultimo_contacto" TIMESTAMP without time zone default '1970-01-01 00:00:00',
"modo" SMALLINT NOT NULL default 0,
"intervalo" INTEGER NOT NULL default 300,
"id_os" INTEGER default 0,
"os_version" varchar(100) default '',
"agent_version" varchar(100) default '',
"ultimo_contacto_remoto" TIMESTAMP without time zone default '01-01-1970 00:00:00',
"ultimo_contacto_remoto" TIMESTAMP without time zone default '1970-01-01 00:00:00',
"disabled" SMALLINT NOT NULL default 0,
"id_parent" INTEGER default 0,
"custom_id" varchar(255) default '',
@ -117,10 +117,10 @@ CREATE TABLE "tagente_estado" (
"id_agente_estado" SERIAL NOT NULL PRIMARY KEY,
"id_agente_modulo" INTEGER NOT NULL default 0,
"datos" text NOT NULL default '',
"timestamp" TIMESTAMP without time zone default '01-01-1970 00:00:00',
"timestamp" TIMESTAMP without time zone default '1970-01-01 00:00:00',
"estado" INTEGER NOT NULL default 0,
"id_agente" INTEGER NOT NULL default 0,
"last_try" TIMESTAMP without time zone default '01-01-1970 00:00:00',
"last_try" TIMESTAMP without time zone default '1970-01-01 00:00:00',
"utimestamp" BIGINT NOT NULL default 0,
"current_interval" INTEGER NOT NULL default 0,
"running_by" INTEGER default 0,
@ -216,7 +216,7 @@ CREATE TABLE "talert_snmp" (
"oid" varchar(255) NOT NULL default '',
"time_threshold" INTEGER NOT NULL default 0,
"times_fired" SMALLINT NOT NULL default 0,
"last_fired" TIMESTAMP without time zone default '01-01-1970 00:00:00',
"last_fired" TIMESTAMP without time zone default '1970-01-01 00:00:00',
"max_alerts" INTEGER NOT NULL default 1,
"min_alerts" INTEGER NOT NULL default 1,
"internal_counter" INTEGER NOT NULL default 0,
@ -379,7 +379,7 @@ CREATE TABLE "tevento" (
"id_usuario" varchar(100) NOT NULL default '0',
"id_grupo" INTEGER NOT NULL default 0,
"estado" INTEGER NOT NULL default 0,
"timestamp" TIMESTAMP without time zone default '01-01-1970 00:00:00',
"timestamp" TIMESTAMP without time zone default '1970-01-01 00:00:00',
"evento" text NOT NULL default '',
"utimestamp" BIGINT NOT NULL default 0,
"event_type" type_tevento_event default 'unknown',
@ -409,8 +409,8 @@ CREATE TABLE "tgrupo" (
CREATE TABLE "tincidencia" (
"id_incidencia" BIGSERIAL NOT NULL PRIMARY KEY,
"inicio" TIMESTAMP without time zone default '01-01-1970 00:00:00',
"cierre" TIMESTAMP without time zone default '01-01-1970 00:00:00',
"inicio" TIMESTAMP without time zone default '1970-01-01 00:00:00',
"cierre" TIMESTAMP without time zone default '1970-01-01 00:00:00',
"titulo" text NOT NULL default '',
"descripcion" text NOT NULL,
"id_usuario" varchar(60) NOT NULL default '',
@ -573,8 +573,8 @@ CREATE TABLE "tserver" (
"name" varchar(100) NOT NULL default '',
"ip_address" varchar(100) NOT NULL default '',
"status" INTEGER NOT NULL default 0,
"laststart" TIMESTAMP without time zone default '01-01-1970 00:00:00',
"keepalive" TIMESTAMP without time zone default '01-01-1970 00:00:00',
"laststart" TIMESTAMP without time zone default '1970-01-01 00:00:00',
"keepalive" TIMESTAMP without time zone default '1970-01-01 00:00:00',
"snmp_server" INTEGER NOT NULL default 0,
"network_server" INTEGER NOT NULL default 0,
"data_server" INTEGER NOT NULL default 0,
@ -619,7 +619,7 @@ CREATE TABLE "tsesion" (
"ip_origen" varchar(100) NOT NULL default '',
"accion" varchar(100) NOT NULL default '',
"descripcion" text NOT NULL default '',
"fecha" TIMESTAMP without time zone default '01-01-1970 00:00:00',
"fecha" TIMESTAMP without time zone default '1970-01-01 00:00:00',
"utimestamp" BIGINT NOT NULL default 0
);
CREATE INDEX "tsesion_utimestamp_idx" ON "tsesion"("utimestamp");
@ -645,7 +645,7 @@ CREATE TABLE "ttrap" (
"alerted" SMALLINT NOT NULL default 0,
"status" SMALLINT NOT NULL default 0,
"id_usuario" varchar(150) default '',
"timestamp" TIMESTAMP without time zone default '01-01-1970 00:00:00',
"timestamp" TIMESTAMP without time zone default '1970-01-01 00:00:00',
"priority" INTEGER NOT NULL default 2
);
@ -681,7 +681,7 @@ CREATE TABLE "tnews" (
"author" varchar(255) NOT NULL DEFAULT '',
"subject" varchar(255) NOT NULL DEFAULT '',
"text" TEXT NOT NULL,
"timestamp" TIMESTAMP without time zone default '01-01-1970 00:00:00'
"timestamp" TIMESTAMP without time zone default '1970-01-01 00:00:00'
);
CREATE TABLE "tgraph" (
@ -856,7 +856,7 @@ CREATE TABLE "tserver_export_data" (
"module_name" varchar(100) NOT NULL default '',
"module_type" varchar(100) NOT NULL default '',
"data" varchar(255) default NULL,
"timestamp" TIMESTAMP without time zone default '01-01-1970 00:00:00'
"timestamp" TIMESTAMP without time zone default '1970-01-01 00:00:00'
);
CREATE TABLE "tplanned_downtime" (
@ -890,7 +890,7 @@ CREATE TABLE "tgis_data_history" (
--timestamp on wich the agente started to be in this position
"start_timestamp" TIMESTAMP without time zone DEFAULT CURRENT_TIMESTAMP,
--timestamp on wich the agent was placed for last time on this position
"end_timestamp" TIMESTAMP without time zone default '01-01-1970 00:00:00',
"end_timestamp" TIMESTAMP without time zone default '1970-01-01 00:00:00',
--description of the region correoponding to this placemnt
"description" TEXT DEFAULT NULL,
-- 0 to show that the position cames from the agent, 1 to show that the position was established manualy

View File

@ -44,13 +44,13 @@ CREATE TABLE IF NOT EXISTS `tagente` (
`direccion` varchar(100) default NULL,
`comentarios` varchar(255) default '',
`id_grupo` int(10) unsigned NOT NULL default '0',
`ultimo_contacto` datetime NOT NULL default '01-01-1970 00:00:00',
`ultimo_contacto` datetime NOT NULL default '1970-01-01 00:00:00',
`modo` tinyint(1) NOT NULL default '0',
`intervalo` int(11) unsigned NOT NULL default '300',
`id_os` int(10) unsigned default '0',
`os_version` varchar(100) default '',
`agent_version` varchar(100) default '',
`ultimo_contacto_remoto` datetime default '01-01-1970 00:00:00',
`ultimo_contacto_remoto` datetime default '1970-01-01 00:00:00',
`disabled` tinyint(2) NOT NULL default '0',
`id_parent` int(10) unsigned default '0',
`custom_id` varchar(255) default '',
@ -110,7 +110,7 @@ CREATE TABLE `tagente_estado` (
`id_agente_estado` int(10) unsigned NOT NULL auto_increment,
`id_agente_modulo` int(10) NOT NULL default '0',
`datos` text NOT NULL default '',
`timestamp` datetime NOT NULL default '01-01-1970 00:00:00',
`timestamp` datetime NOT NULL default '1970-01-01 00:00:00',
`estado` int(4) NOT NULL default '0',
`id_agente` int(10) NOT NULL default '0',
`last_try` datetime default NULL,
@ -213,7 +213,7 @@ CREATE TABLE IF NOT EXISTS `talert_snmp` (
`oid` varchar(255) NOT NULL default '',
`time_threshold` int(11) NOT NULL default '0',
`times_fired` int(2) unsigned NOT NULL default '0',
`last_fired` datetime NOT NULL default '01-01-1970 00:00:00',
`last_fired` datetime NOT NULL default '1970-01-01 00:00:00',
`max_alerts` int(11) NOT NULL default '1',
`min_alerts` int(11) NOT NULL default '1',
`internal_counter` int(2) unsigned NOT NULL default '0',
@ -412,7 +412,7 @@ CREATE TABLE IF NOT EXISTS `tevento` (
`id_usuario` varchar(100) NOT NULL default '0',
`id_grupo` mediumint(4) NOT NULL default '0',
`estado` tinyint(3) unsigned NOT NULL default '0',
`timestamp` datetime NOT NULL default '01-01-1970 00:00:00',
`timestamp` datetime NOT NULL default '1970-01-01 00:00:00',
`evento` text NOT NULL default '',
`utimestamp` bigint(20) NOT NULL default '0',
`event_type` enum('unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal','going_down_critical','going_up_normal') default 'unknown',
@ -445,8 +445,8 @@ CREATE TABLE IF NOT EXISTS `tgrupo` (
CREATE TABLE IF NOT EXISTS `tincidencia` (
`id_incidencia` bigint(6) unsigned zerofill NOT NULL auto_increment,
`inicio` datetime NOT NULL default '01-01-1970 00:00:00',
`cierre` datetime NOT NULL default '01-01-1970 00:00:00',
`inicio` datetime NOT NULL default '1970-01-01 00:00:00',
`cierre` datetime NOT NULL default '1970-01-01 00:00:00',
`titulo` text NOT NULL default '',
`descripcion` text NOT NULL,
`id_usuario` varchar(60) NOT NULL default '',
@ -627,8 +627,8 @@ CREATE TABLE IF NOT EXISTS `tserver` (
`name` varchar(100) NOT NULL default '',
`ip_address` varchar(100) NOT NULL default '',
`status` int(11) NOT NULL default '0',
`laststart` datetime NOT NULL default '01-01-1970 00:00:00',
`keepalive` datetime NOT NULL default '01-01-1970 00:00:00',
`laststart` datetime NOT NULL default '1970-01-01 00:00:00',
`keepalive` datetime NOT NULL default '1970-01-01 00:00:00',
`snmp_server` tinyint(3) unsigned NOT NULL default '0',
`network_server` tinyint(3) unsigned NOT NULL default '0',
`data_server` tinyint(3) unsigned NOT NULL default '0',
@ -674,7 +674,7 @@ CREATE TABLE IF NOT EXISTS `tsesion` (
`ip_origen` varchar(100) NOT NULL default '',
`accion` varchar(100) NOT NULL default '',
`descripcion` text NOT NULL default '',
`fecha` datetime NOT NULL default '01-01-1970 00:00:00',
`fecha` datetime NOT NULL default '1970-01-01 00:00:00',
`utimestamp` bigint(20) unsigned NOT NULL default '0',
PRIMARY KEY (`id_sesion`),
KEY `idx_utimestamp` (`utimestamp`),
@ -704,7 +704,7 @@ CREATE TABLE IF NOT EXISTS `ttrap` (
`alerted` smallint(6) NOT NULL default '0',
`status` smallint(6) NOT NULL default '0',
`id_usuario` varchar(150) default '',
`timestamp` datetime NOT NULL default '01-01-1970 00:00:00',
`timestamp` datetime NOT NULL default '1970-01-01 00:00:00',
`priority` tinyint(4) unsigned NOT NULL default '2',
PRIMARY KEY (`id_trap`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@ -939,7 +939,7 @@ CREATE TABLE IF NOT EXISTS `tserver_export_data` (
`module_name` varchar(100) NOT NULL default '',
`module_type` varchar(100) NOT NULL default '',
`data` varchar(255) default NULL,
`timestamp` datetime NOT NULL default '01-01-1970 00:00:00',
`timestamp` datetime NOT NULL default '1970-01-01 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;