DROP TABLE IF EXISTS `glpi_plugin_eventlog_eventlogservers`;
CREATE TABLE `glpi_plugin_eventlog_eventlogservers` (
	`id` int(11) NOT NULL auto_increment,
	`name` varchar(255) collate utf8_unicode_ci default NULL,
	`entities_id` int(11) NOT NULL default '0',
	`eventlog_db_user` varchar(255) collate utf8_unicode_ci default NULL,
	`eventlog_db_passwd` varchar(255) collate utf8_unicode_ci default NULL,
	`eventlog_db_host` varchar(255) collate utf8_unicode_ci default NULL,
	`eventlog_db_name` varchar(255) collate utf8_unicode_ci default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `glpi_plugin_eventlog_ticketcategories`;
CREATE TABLE `glpi_plugin_eventlog_ticketcategories` (
	`id` int(11) NOT NULL auto_increment,
	`ticketcategories_id` int(11) NOT NULL default '0' COMMENT 'RELATION to glpi_ticketcategories (id)',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `glpi_plugin_eventlog_knowbaseitemcategories`;
CREATE TABLE `glpi_plugin_eventlog_knowbaseitemcategories` (
	`id` int(11) NOT NULL auto_increment,
	`knowbaseitemcategories_id` int(11) NOT NULL default '0' COMMENT 'RELATION to glpi_knowbaseitemcategories (id)',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `glpi_plugin_eventlog_defaulttypes`;
CREATE TABLE `glpi_plugin_eventlog_defaulttypes` (
	`id` int(11) NOT NULL auto_increment,
	`types_id` int(11) NOT NULL default '0' COMMENT 'RELATION to glpi_plugin_eventlog_eventlogtypes from eventlog DB (id)',
	PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `glpi_plugin_eventlog_defaultlogs`;
CREATE TABLE `glpi_plugin_eventlog_defaultlogs` (
	`id` int(11) NOT NULL auto_increment,
	`logs_name` varchar(255) collate utf8_unicode_ci default NULL COMMENT 'RELATION to events from eventlog DB (log)',
	PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO `glpi_plugin_eventlog_defaulttypes` (`ID`, `types_id`) VALUES ('1', '1');

DROP TABLE IF EXISTS `glpi_plugin_eventlog_profiles`;
CREATE TABLE `glpi_plugin_eventlog_profiles` (
	`id` int(11) NOT NULL auto_increment,
	`profiles_id` int(11) NOT NULL default '0' COMMENT 'RELATION to glpi_profiles (id)',
	`eventlog` char(1) collate utf8_unicode_ci default NULL,
	PRIMARY KEY  (`id`),
	KEY `profiles_id` (`profiles_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO glpi_displaypreferences VALUES (NULL,'PluginEventlogEventlog','1','1','0');
INSERT INTO glpi_displaypreferences VALUES (NULL,'PluginEventlogEventlog','4','2','0');
INSERT INTO glpi_displaypreferences VALUES (NULL,'PluginEventlogEventlog','3','3','0');
INSERT INTO glpi_displaypreferences VALUES (NULL,'PluginEventlogEventlog','6','4','0');
INSERT INTO glpi_displaypreferences VALUES (NULL,'PluginEventlogEventlog','7','5','0');
INSERT INTO glpi_displaypreferences VALUES (NULL,'PluginEventlogEventlog','5','6','0');
INSERT INTO glpi_displaypreferences VALUES (NULL,'PluginEventlogEventlog','8','7','0');
INSERT INTO glpi_displaypreferences VALUES (NULL,'PluginEventlogEventlog','10','8','0');