CREATE TABLE IF NOT EXISTS `User` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `FullName` varchar(255) NOT NULL,
  `Name` varchar(255) NOT NULL,
  `Password` varchar(255) NOT NULL,
  `Salt` varchar(255) NOT NULL,
  `Company` int(11) DEFAULT NULL,
  `RegistrationTime` datetime DEFAULT NULL,
  `Email` varchar(255) NOT NULL,
  PRIMARY KEY (`Id`),
  UNIQUE KEY `Name` (`Name`),
  KEY `Company` (`Company`),
  KEY `Password` (`Password`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

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

--
-- Struktura tabulky `UserOnline`
--

CREATE TABLE IF NOT EXISTS `UserOnline` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `User` int(11) NOT NULL DEFAULT '0',
  `ActivityTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `LoginTime` datetime DEFAULT '0000-00-00 00:00:00',
  `SessionId` varchar(255) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL DEFAULT '',
  `IpAddress` varchar(16) CHARACTER SET utf8 COLLATE utf8_czech_ci DEFAULT NULL,
  `HostName` varchar(255) CHARACTER SET utf8 COLLATE utf8_czech_ci DEFAULT NULL,
  `ScriptName` varchar(255) CHARACTER SET utf8 COLLATE utf8_czech_ci DEFAULT NULL,
  PRIMARY KEY (`Id`),
  KEY `User` (`User`),
  KEY `SessionId` (`SessionId`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

CREATE TABLE IF NOT EXISTS `HTTPSession` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `Time` datetime NOT NULL,
  `Identification` varchar(255) NOT NULL,
  `Variables` text NOT NULL,
  PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
