-- http://www.phpmyadmin.net
--
-- Generato il: 05 ago, 2011 at 12:13 AM
-- Versione MySQL: 5.1.49
-- Versione PHP: 5.3.6-13




--
-- Database: `eyeos25`
--

-- --------------------------------------------------------

--
-- Struttura della tabella `cache`
--

CREATE TABLE IF NOT EXISTS `cache` (
  `cache_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cache_key` varchar(128) CHARACTER SET ascii NOT NULL,
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `data` longtext NOT NULL,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`cache_id`),
  KEY `created_index` (`created`),
  KEY `user_cache_index` (`user_id`,`cache_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dump dei dati per la tabella `cache`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `calendar`
--

CREATE TABLE IF NOT EXISTS `calendar` (
  `id` varchar(128) NOT NULL,
  `name` varchar(64) NOT NULL,
  `description` text,
  `timezone` tinyint(4) NOT NULL,
  `ownerid` varchar(128) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `ownerid` (`ownerid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dump dei dati per la tabella `calendar`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `calendarevent`
--

CREATE TABLE IF NOT EXISTS `calendarevent` (
  `id` varchar(128) NOT NULL,
  `subject` varchar(128) NOT NULL,
  `location` varchar(128) DEFAULT NULL,
  `description` text,
  `isallday` tinyint(1) NOT NULL,
  `timestart` int(32) NOT NULL,
  `timeend` int(32) NOT NULL,
  `type` varchar(16) NOT NULL,
  `privacy` varchar(10) NOT NULL,
  `repetition` varchar(64) NOT NULL,
  `creatorid` varchar(128) NOT NULL,
  `calendarid` varchar(128) NOT NULL,
  `repeattype` varchar(1) DEFAULT NULL,
  `finaltype` tinyint(4) DEFAULT NULL,
  `finalvalue` int(32) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `creatorid` (`creatorid`),
  KEY `calendarid` (`calendarid`),
  KEY `timestart` (`timestart`),
  KEY `timeend` (`timeend`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dump dei dati per la tabella `calendarevent`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `calendarprefs`
--

CREATE TABLE IF NOT EXISTS `calendarprefs` (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `color` varchar(7) NOT NULL,
  `visible` tinyint(1) NOT NULL,
  `notifications` text NOT NULL,
  `userid` varchar(128) NOT NULL,
  `calendarid` varchar(128) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_calendarprefs_userid_calendarid` (`userid`,`calendarid`),
  KEY `userid` (`userid`),
  KEY `calendarid` (`calendarid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dump dei dati per la tabella `channels`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `contactgroupmembers`
--

CREATE TABLE IF NOT EXISTS `contactgroupmembers` (
  `contactgroup_id` int(10) unsigned NOT NULL,
  `contact_id` int(10) unsigned NOT NULL DEFAULT '0',
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  PRIMARY KEY (`contactgroup_id`,`contact_id`),
  KEY `contact_id_fk_contacts` (`contact_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dump dei dati per la tabella `contactgroupmembers`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `contactgroups`
--

CREATE TABLE IF NOT EXISTS `contactgroups` (
  `contactgroup_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `del` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL DEFAULT '',
  PRIMARY KEY (`contactgroup_id`),
  KEY `contactgroups_user_index` (`user_id`,`del`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dump dei dati per la tabella `contactgroups`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `contacts`
--

CREATE TABLE IF NOT EXISTS `contacts` (
  `contact_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `del` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL DEFAULT '',
  `email` varchar(128) NOT NULL,
  `firstname` varchar(128) NOT NULL DEFAULT '',
  `surname` varchar(128) NOT NULL DEFAULT '',
  `vcard` text,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`contact_id`),
  KEY `user_contacts_index` (`user_id`,`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dump dei dati per la tabella `contacts`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `eventgroup`
--

CREATE TABLE IF NOT EXISTS `eventgroup` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `eventsubject` varchar(128) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dump dei dati per la tabella `eventgroup`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `eventineventgroup`
--

CREATE TABLE IF NOT EXISTS `eventineventgroup` (
  `eventId` varchar(128) NOT NULL,
  `eventgroupid` int(11) NOT NULL,
  KEY `eventineventgroup_ibfk_4` (`eventId`),
  KEY `eventineventgroup_ibfk_5` (`eventgroupid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dump dei dati per la tabella `eventineventgroup`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `eventnotificationinformation`
--

CREATE TABLE IF NOT EXISTS `eventnotificationinformation` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `type` varchar(128) DEFAULT NULL,
  `answer` varchar(128) DEFAULT NULL,
  `creationdate` int(32) NOT NULL,
  `sender` varchar(128) NOT NULL,
  `receiver` varchar(128) NOT NULL,
  `question` text NOT NULL,
  `messageinformation` text,
  `availableanswers` text,
  `isquestion` tinyint(1) NOT NULL,
  `eventdata` text,
  `hasended` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eventnotificationinformation_ibfk_1` (`sender`),
  KEY `eventnotificationinformation_ibfk_2` (`receiver`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dump dei dati per la tabella `eventnotificationinformation`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `eyeosgroup`
--

CREATE TABLE IF NOT EXISTS `eyeosgroup` (
  `id` varchar(128) NOT NULL,
  `name` varchar(40) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dump dei dati per la tabella `eyeosgroup`
--

INSERT INTO `eyeosgroup` (`id`, `name`, `status`) VALUES
('eyeID_EyeosGroup_admin', 'admin', 0),
('eyeID_EyeosGroup_exec', 'exec', 0),
('eyeID_EyeosGroup_lfs', 'lfs', 0),
('eyeID_EyeosGroup_mnt', 'mnt', 0),
('eyeID_EyeosGroup_rfs', 'rfs', 0),
('eyeID_EyeosGroup_root', 'root', 0),
('eyeID_EyeosGroup_sys', 'sys', 0),
('eyeID_EyeosGroup_um', 'um', 0),
('eyeID_EyeosGroup_users', 'users', 0),
('eyeID_EyeosGroup_vfs', 'vfs', 0),
('eyeID_EyeosGroup_wg', 'wg', 0),
('eyeID_EyeosGroup_wg-managers', 'wg-managers', 0);

-- --------------------------------------------------------

--
-- Struttura della tabella `eyeosmetadata`
--

CREATE TABLE IF NOT EXISTS `eyeosmetadata` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `className` varchar(128) NOT NULL,
  `object_id` varchar(128) NOT NULL,
  `name` text NOT NULL,
  `data` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=28 ;

--
-- Dump dei dati per la tabella `eyeosmetadata`
--

INSERT INTO `eyeosmetadata` (`id`, `className`, `object_id`, `name`, `data`) VALUES
(25, 'EyeosUser', 'eyeID_EyeosUser_root', 'eyeos.user.desktop.backgroundColors', 'a:9:{s:7:"#E6E6E6";s:4:"true";s:7:"#CCDADA";s:5:"false";s:7:"#A1C4E0";s:5:"false";s:7:"#A7AFC4";s:5:"false";s:7:"#999999";s:5:"false";s:7:"#6293BB";s:5:"false";s:7:"#679966";s:5:"false";s:7:"#787B9A";s:5:"false";s:7:"#6E829A";s:5:"false";}'),
(23, 'EyeosUser', 'eyeID_EyeosUser_root', 'eyeos.desktop.dashboard.nbcolumns', 's:1:"3";'),
(24, 'EyeosUser', 'eyeID_EyeosUser_root', 'eyeos.user.desktop.wallpaperMode', 's:5:"image";'),
(19, 'EyeosUser', 'eyeID_EyeosUser_root', 'eyeos.user.desktop.wallpaperId', 's:6:"nature";'),
(20, 'EyeosUser', 'eyeID_EyeosUser_root', 'eyeos.user.language', 's:2:"en";'),
(21, 'EyeosUser', 'eyeID_EyeosUser_root', 'eyeos.user.applications.favorite', 'a:5:{s:10:"calculator";s:1:"0";s:5:"files";s:1:"0";s:8:"calendar";s:1:"0";s:9:"documents";s:1:"0";s:7:"notepad";s:1:"0";}'),
(22, 'EyeosUser', 'eyeID_EyeosUser_root', 'eyeos.desktop.mode', 's:7:"classic";'),
(18, 'EyeosUser', 'eyeID_EyeosUser_root', 'eyeos.user.desktop.widgets', 'a:7:{s:7:"desktop";a:4:{s:5:"title";s:7:"Desktop";s:9:"installed";s:5:"false";s:6:"column";s:1:"1";s:8:"position";s:1:"1";}s:5:"files";a:5:{s:5:"title";s:5:"Files";s:9:"installed";s:4:"true";s:6:"column";i:1;s:8:"position";i:0;s:9:"minimized";b:0;}s:6:"groups";a:5:{s:5:"title";s:9:"My Groups";s:9:"installed";s:4:"true";s:6:"column";i:1;s:8:"position";i:1;s:9:"minimized";b:0;}s:6:"events";a:6:{s:5:"title";s:6:"Events";s:9:"installed";s:4:"true";s:5:"items";s:1:"5";s:6:"column";i:3;s:8:"position";i:1;s:9:"minimized";b:0;}s:9:"favorites";a:5:{s:5:"title";s:22:"Favorites Applications";s:9:"installed";s:4:"true";s:6:"column";i:3;s:8:"position";i:0;s:9:"minimized";b:0;}s:5:"notes";a:5:{s:5:"title";s:5:"Notes";s:9:"installed";s:4:"true";s:6:"column";i:3;s:8:"position";i:2;s:9:"minimized";b:0;}i:1;a:3:{s:6:"column";i:1;s:8:"position";i:0;s:9:"minimized";b:0;}}'),
(16, 'EyeosUser', 'eyeID_EyeosUser_root', 'eyeos.user.email', 's:16:"root@example.com";'),
(17, 'EyeosUser', 'eyeID_EyeosUser_root', 'eyeos.user.applications.installed', 'a:6:{s:10:"calculator";s:1:"0";s:4:"mail";s:1:"0";s:5:"files";s:1:"0";s:8:"calendar";s:1:"0";s:9:"documents";s:1:"0";s:7:"notepad";s:1:"0";}'),
(14, 'EyeosUser', 'eyeID_EyeosUser_root', 'eyeos.user.firstname', 's:4:"root";'),
(15, 'EyeosUser', 'eyeID_EyeosUser_root', 'eyeos.user.lastname', 's:4:"root";'),
(26, 'EyeosUser', 'eyeID_EyeosUser_root', 'eyeos.user.desktop.wallpaper', 's:50:"sys:///extern/images/wallpapers/nature/default.jpg";'),
(27, 'EyeosUser', 'eyeID_EyeosUser_root', 'eyeos.user.desktop.showWelcome', 's:5:"false";');

-- --------------------------------------------------------

--
-- Struttura della tabella `eyeosprincipalgroupassignation`
--

CREATE TABLE IF NOT EXISTS `eyeosprincipalgroupassignation` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `principalid` varchar(128) NOT NULL,
  `groupid` varchar(128) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `principalid` (`principalid`),
  KEY `groupid` (`groupid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=41 ;

--
-- Dump dei dati per la tabella `eyeosprincipalgroupassignation`
--

INSERT INTO `eyeosprincipalgroupassignation` (`id`, `principalid`, `groupid`) VALUES
(1, 'eyeID_EyeosUser_root', 'eyeID_EyeosGroup_root'),
(2, 'eyeID_EyeosUser_root', 'eyeID_EyeosGroup_users'),
(3, 'eyeID_EyeosUser_root', 'eyeID_EyeosGroup_sys'),
(4, 'eyeID_EyeosUser_register', 'eyeID_EyeosGroup_sys'),
(5, 'eyeID_EyeosUser_register', 'eyeID_EyeosGroup_um'),
(6, 'eyeID_EyeosGroup_wg-managers', 'eyeID_EyeosGroup_wg');

-- --------------------------------------------------------

--
-- Struttura della tabella `eyeosuserworkgroupassignation`
--

CREATE TABLE IF NOT EXISTS `eyeosuserworkgroupassignation` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `userid` varchar(128) NOT NULL,
  `workgroupid` varchar(128) NOT NULL,
  `role` tinyint(4) NOT NULL,
  `status` tinyint(4) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_userid_workgroupid` (`userid`,`workgroupid`),
  KEY `userid` (`userid`),
  KEY `workgroupid` (`workgroupid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

--
-- Dump dei dati per la tabella `eyeosuserworkgroupassignation`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `eyeosworkgroup`
--

CREATE TABLE IF NOT EXISTS `eyeosworkgroup` (
  `id` varchar(128) NOT NULL,
  `name` varchar(40) NOT NULL,
  `ownerId` varchar(128) NOT NULL,
  `mastergroupid` varchar(128) NOT NULL,
  `privacymode` tinyint(4) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  KEY `ownerId` (`ownerId`),
  KEY `mastergroupid` (`mastergroupid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dump dei dati per la tabella `eyeosworkgroup`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `identities`
--

CREATE TABLE IF NOT EXISTS `identities` (
  `identity_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `del` tinyint(1) NOT NULL DEFAULT '0',
  `standard` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL,
  `organization` varchar(128) NOT NULL DEFAULT '',
  `email` varchar(128) NOT NULL,
  `reply-to` varchar(128) NOT NULL DEFAULT '',
  `bcc` varchar(128) NOT NULL DEFAULT '',
  `signature` text,
  `html_signature` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`identity_id`),
  KEY `user_identities_index` (`user_id`,`del`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dump dei dati per la tabella `identities`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `impressionto`
--

CREATE TABLE IF NOT EXISTS `impressionto` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sourceId` varchar(128) NOT NULL,
  `targetId` varchar(128) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sourceId` (`sourceId`),
  KEY `targetId` (`targetId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dump dei dati per la tabella `impressionto`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `languageadminto`
--

CREATE TABLE IF NOT EXISTS `languageadminto` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `language` varchar(50) NOT NULL,
  `code` varchar(10) NOT NULL,
  `assigned` varchar(128) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `assigned` (`assigned`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dump dei dati per la tabella `mailaccounts`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `messages`
--

CREATE TABLE IF NOT EXISTS `messages` (
  `message_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `del` tinyint(1) NOT NULL DEFAULT '0',
  `cache_key` varchar(128) CHARACTER SET ascii NOT NULL,
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `idx` int(11) unsigned NOT NULL DEFAULT '0',
  `uid` int(11) unsigned NOT NULL DEFAULT '0',
  `subject` varchar(255) NOT NULL,
  `from` varchar(255) NOT NULL,
  `to` varchar(255) NOT NULL,
  `cc` varchar(255) NOT NULL,
  `date` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `size` int(11) unsigned NOT NULL DEFAULT '0',
  `headers` text NOT NULL,
  `structure` text,
  PRIMARY KEY (`message_id`),
  UNIQUE KEY `uniqueness` (`user_id`,`cache_key`,`uid`),
  KEY `created_index` (`created`),
  KEY `index_index` (`user_id`,`cache_key`,`idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dump dei dati per la tabella `messages`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `netsyncHooks`
--

CREATE TABLE IF NOT EXISTS `netsyncHooks` (
  `callback` varchar(256) NOT NULL,
  `file` varchar(256) NOT NULL,
  PRIMARY KEY (`callback`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1;

--
-- Dump dei dati per la tabella `netsyncHooks`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `netsync_messages`
--

CREATE TABLE IF NOT EXISTS `netsync_messages` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `from` varchar(128) NOT NULL,
  `to` varchar(128) NOT NULL,
  `data` varchar(1024) NOT NULL,
  `timestamp` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dump dei dati per la tabella `netsync_messages`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `peopletag`
--

CREATE TABLE IF NOT EXISTS `peopletag` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `userId` varchar(128) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `userId` (`userId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dump dei dati per la tabella `peopletag`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `presence`
--

CREATE TABLE IF NOT EXISTS `presence` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userId` varchar(128) CHARACTER SET utf8 NOT NULL,
  `lastSeen` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `userId` (`userId`)
) ENGINE=InnoDB DEFAULT CHARSET=ucs2 AUTO_INCREMENT=1 ;

--
-- Dump dei dati per la tabella `presence`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `pressence`
--

CREATE TABLE IF NOT EXISTS `pressence` (
  `who` varchar(128) NOT NULL,
  `since` int(10) unsigned NOT NULL,
  `loggedIn` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`who`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1;

--
-- Dump dei dati per la tabella `pressence`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `relation`
--

CREATE TABLE IF NOT EXISTS `relation` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sourceId` varchar(128) NOT NULL,
  `targetId` varchar(128) NOT NULL,
  `state` varchar(50) NOT NULL,
  `lastmodification` int(32) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sourceId` (`sourceId`),
  KEY `targetId` (`targetId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dump dei dati per la tabella `session`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `subscriptions`
--

CREATE TABLE IF NOT EXISTS `subscriptions` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `who` varchar(128) NOT NULL,
  `channel` varchar(128) NOT NULL,
  `since` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MEMORY  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

--
-- Dump dei dati per la tabella `subscriptions`
--

INSERT INTO `subscriptions` (`id`, `who`, `channel`, `since`) VALUES
(1, 'eyeID_EyeosUser_root', 'pressence', 1312495752),
(2, 'eyeID_EyeosUser_root', 'eyeID_EyeosUser_root', 1312494865);

-- --------------------------------------------------------

--
-- Struttura della tabella `tag`
--

CREATE TABLE IF NOT EXISTS `tag` (
  `tagid` bigint(20) NOT NULL AUTO_INCREMENT,
  `principalid` varchar(128) NOT NULL,
  `label` varchar(64) NOT NULL,
  `color` varchar(7) NOT NULL,
  PRIMARY KEY (`tagid`),
  UNIQUE KEY `UNQ_tag_principalid_label` (`principalid`,`label`),
  KEY `principalid` (`principalid`),
  KEY `label` (`label`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dump dei dati per la tabella `tag`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `taggedobject`
--

CREATE TABLE IF NOT EXISTS `taggedobject` (
  `taggableobjectid` varchar(128) NOT NULL,
  `objectdata` text NOT NULL,
  `handlerclassname` varchar(128) NOT NULL,
  PRIMARY KEY (`taggableobjectid`),
  KEY `handlerclassname` (`handlerclassname`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dump dei dati per la tabella `taggedobject`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `tagobjectassignation`
--

CREATE TABLE IF NOT EXISTS `tagobjectassignation` (
  `taggableobjectid` varchar(128) NOT NULL,
  `tagid` bigint(20) NOT NULL,
  UNIQUE KEY `UNQ_tagobjectassignation_taggableoibjectid_tagid` (`taggableobjectid`,`tagid`),
  KEY `taggableobjectid` (`taggableobjectid`),
  KEY `tagid` (`tagid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dump dei dati per la tabella `tagobjectassignation`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `tagperimpressionto`
--

CREATE TABLE IF NOT EXISTS `tagperimpressionto` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tagId` int(11) NOT NULL,
  `impressionId` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `tagId` (`tagId`),
  KEY `impressionId` (`impressionId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dump dei dati per la tabella `tagperimpressionto`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `urlfile`
--

CREATE TABLE IF NOT EXISTS `urlfile` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `path` varchar(200) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `path` (`path`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dump dei dati per la tabella `urlshare`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `users`
--

CREATE TABLE IF NOT EXISTS `users` (
  `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(128) NOT NULL,
  `mail_host` varchar(128) NOT NULL,
  `alias` varchar(128) NOT NULL,
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `last_login` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `language` varchar(5) DEFAULT NULL,
  `preferences` text,
  PRIMARY KEY (`user_id`),
  KEY `username_index` (`username`),
  KEY `alias_index` (`alias`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dump dei dati per la tabella `users`
--


--
-- Limiti per le tabelle scaricate
--

--
-- Limiti per la tabella `cache`
--
ALTER TABLE `cache`
  ADD CONSTRAINT `user_id_fk_cache` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Limiti per la tabella `calendarevent`
--
ALTER TABLE `calendarevent`
  ADD CONSTRAINT `calendarevent_ibfk_4` FOREIGN KEY (`creatorid`) REFERENCES `eyeosuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `calendarevent_ibfk_5` FOREIGN KEY (`calendarid`) REFERENCES `calendar` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Limiti per la tabella `calendarprefs`
--
ALTER TABLE `calendarprefs`
  ADD CONSTRAINT `calendarprefs_ibfk_2` FOREIGN KEY (`calendarid`) REFERENCES `calendar` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `calendarprefs_ibfk_3` FOREIGN KEY (`userid`) REFERENCES `eyeosuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Limiti per la tabella `contactgroupmembers`
--
ALTER TABLE `contactgroupmembers`
  ADD CONSTRAINT `contactgroup_id_fk_contactgroups` FOREIGN KEY (`contactgroup_id`) REFERENCES `contactgroups` (`contactgroup_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `contact_id_fk_contacts` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`contact_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Limiti per la tabella `contactgroups`
--
ALTER TABLE `contactgroups`
  ADD CONSTRAINT `user_id_fk_contactgroups` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Limiti per la tabella `contacts`
--
ALTER TABLE `contacts`
  ADD CONSTRAINT `user_id_fk_contacts` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Limiti per la tabella `eventineventgroup`
--
ALTER TABLE `eventineventgroup`
  ADD CONSTRAINT `eventineventgroup_ibfk_4` FOREIGN KEY (`eventId`) REFERENCES `calendarevent` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `eventineventgroup_ibfk_5` FOREIGN KEY (`eventgroupid`) REFERENCES `eventgroup` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Limiti per la tabella `eventnotificationinformation`
--
ALTER TABLE `eventnotificationinformation`
  ADD CONSTRAINT `eventnotificationinformation_ibfk_1` FOREIGN KEY (`sender`) REFERENCES `eyeosuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `eventnotificationinformation_ibfk_2` FOREIGN KEY (`receiver`) REFERENCES `eyeosuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Limiti per la tabella `eyeosprincipalgroupassignation`
--
ALTER TABLE `eyeosprincipalgroupassignation`
  ADD CONSTRAINT `FK_eyeosprincipal2groupassignation_group_id` FOREIGN KEY (`groupid`) REFERENCES `eyeosgroup` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Limiti per la tabella `eyeosuserworkgroupassignation`
--
ALTER TABLE `eyeosuserworkgroupassignation`
  ADD CONSTRAINT `eyeosuserworkgroupassignation_ibfk_2` FOREIGN KEY (`workgroupid`) REFERENCES `eyeosworkgroup` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `eyeosuserworkgroupassignation_ibfk_3` FOREIGN KEY (`userid`) REFERENCES `eyeosuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Limiti per la tabella `eyeosworkgroup`
--
ALTER TABLE `eyeosworkgroup`
  ADD CONSTRAINT `eyeosworkgroup_ibfk_3` FOREIGN KEY (`ownerId`) REFERENCES `eyeosuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `eyeosworkgroup_ibfk_4` FOREIGN KEY (`mastergroupid`) REFERENCES `eyeosgroup` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Limiti per la tabella `identities`
--
ALTER TABLE `identities`
  ADD CONSTRAINT `user_id_fk_identities` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Limiti per la tabella `impressionto`
--
ALTER TABLE `impressionto`
  ADD CONSTRAINT `impressionto_ibfk_2` FOREIGN KEY (`targetId`) REFERENCES `eyeosuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `impressionto_ibfk_1` FOREIGN KEY (`sourceId`) REFERENCES `eyeosuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Limiti per la tabella `languageadminto`
--
ALTER TABLE `languageadminto`
  ADD CONSTRAINT `languageadminto_ibfk_1` FOREIGN KEY (`assigned`) REFERENCES `eyeosuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Limiti per la tabella `messages`
--
ALTER TABLE `messages`
  ADD CONSTRAINT `user_id_fk_messages` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Limiti per la tabella `peopletag`
--
ALTER TABLE `peopletag`
  ADD CONSTRAINT `peopletag_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `eyeosuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Limiti per la tabella `presence`
--
ALTER TABLE `presence`
  ADD CONSTRAINT `presence_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `eyeosuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Limiti per la tabella `relation`
--
ALTER TABLE `relation`
  ADD CONSTRAINT `relation_ibfk_2` FOREIGN KEY (`targetId`) REFERENCES `eyeosuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `relation_ibfk_1` FOREIGN KEY (`sourceId`) REFERENCES `eyeosuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Limiti per la tabella `tagobjectassignation`
--
ALTER TABLE `tagobjectassignation`
  ADD CONSTRAINT `tagobjectassignation_ibfk_2` FOREIGN KEY (`tagid`) REFERENCES `tag` (`tagid`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `tagobjectassignation_ibfk_1` FOREIGN KEY (`taggableobjectid`) REFERENCES `taggedobject` (`taggableobjectid`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Limiti per la tabella `tagperimpressionto`
--
ALTER TABLE `tagperimpressionto`
  ADD CONSTRAINT `tagperimpressionto_ibfk_2` FOREIGN KEY (`impressionId`) REFERENCES `impressionto` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `tagperimpressionto_ibfk_1` FOREIGN KEY (`tagId`) REFERENCES `peopletag` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
