Changeset 593 for trunk/Modules/User/User.php
- Timestamp:
- Nov 2, 2013, 11:00:41 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/User.php
r586 r593 401 401 function DoInstall() 402 402 { 403 $this->Database->query("CREATE TABLE IF NOT EXISTS `User` ( 404 `Id` int(11) NOT NULL AUTO_INCREMENT, 405 `Login` varchar(64) NOT NULL, 406 `Name` varchar(128) NOT NULL, 407 `Password` varchar(255) NOT NULL, 408 `Salt` varchar(255) NOT NULL, 409 `Email` varchar(128) NOT NULL DEFAULT '', 410 `LastIpAddress` varchar(16) NOT NULL DEFAULT '', 411 `LastLoginTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 412 `RegistrationTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 413 `Locked` tinyint(1) NOT NULL DEFAULT '0', 414 `ICQ` int(11) NOT NULL DEFAULT '0', 415 `PhoneNumber` varchar(32) NOT NULL DEFAULT '', 416 `InitPassword` varchar(255) NOT NULL, 417 PRIMARY KEY (`Id`), 418 UNIQUE KEY `Name` (`Login`), 419 UNIQUE KEY `Nick` (`Name`) 420 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;"); 421 $this->Database->query("CREATE TABLE IF NOT EXISTS `UserOnline` ( 422 `Id` int(11) NOT NULL AUTO_INCREMENT, 423 `User` int(11) DEFAULT NULL COMMENT 'User.Id', 424 `ActivityTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 425 `LoginTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 426 `SessionId` varchar(255) NOT NULL DEFAULT '', 427 `IpAddress` varchar(16) NOT NULL DEFAULT '', 428 `HostName` varchar(255) NOT NULL DEFAULT '', 429 `ScriptName` varchar(255) NOT NULL, 430 PRIMARY KEY (`Id`), 431 KEY `User` (`User`) 432 ) ENGINE=MEMORY DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;"); 403 433 } 404 434 405 435 function DoUninstall() 406 436 { 437 $this->Database->query('DROP TABLE `UserOnline`'); 438 $this->Database->query('DROP TABLE `User`'); 407 439 } 408 440
Note:
See TracChangeset
for help on using the changeset viewer.