Difference between revisions of "Account (Database Table)"
From SWGANH Wiki
(→Table Structure) |
(→Table Create Script) |
||
Line 60: | Line 60: | ||
CREATE TABLE `account` ( | CREATE TABLE `account` ( | ||
`account_id` bigint(20) unsigned NOT NULL auto_increment COMMENT 'Account ID', | `account_id` bigint(20) unsigned NOT NULL auto_increment COMMENT 'Account ID', | ||
− | `username` char(32) | + | `username` char(32) NOT NULL default '' COMMENT 'Account username', |
− | `password` char( | + | `password` char(64) NOT NULL COMMENT 'Account password', |
`station_id` bigint(20) unsigned NOT NULL default '0' COMMENT 'Account STATION_ID', | `station_id` bigint(20) unsigned NOT NULL default '0' COMMENT 'Account STATION_ID', | ||
`csr` tinyint(1) NOT NULL default '0' COMMENT 'Account - CSR Flag', | `csr` tinyint(1) NOT NULL default '0' COMMENT 'Account - CSR Flag', | ||
`banned` tinyint(1) NOT NULL default '0' COMMENT 'Account - Banned Status', | `banned` tinyint(1) NOT NULL default '0' COMMENT 'Account - Banned Status', | ||
− | `email` char(64) | + | `email` char(64) NOT NULL default '' COMMENT 'Account - User email', |
`joindate` datetime NOT NULL default '0000-00-00 00:00:00' COMMENT 'Account - Join Date', | `joindate` datetime NOT NULL default '0000-00-00 00:00:00' COMMENT 'Account - Join Date', | ||
`lastlogin` timestamp NULL default NULL COMMENT 'Account - Last Login Timestamp', | `lastlogin` timestamp NULL default NULL COMMENT 'Account - Last Login Timestamp', | ||
Line 72: | Line 72: | ||
`authenticated` tinyint(1) NOT NULL default '0' COMMENT 'Account - Authenticated Status', | `authenticated` tinyint(1) NOT NULL default '0' COMMENT 'Account - Authenticated Status', | ||
`characters_allowed` tinyint(3) unsigned NOT NULL default '2', | `characters_allowed` tinyint(3) unsigned NOT NULL default '2', | ||
+ | `session_key` varchar(32) default NULL, | ||
PRIMARY KEY (`account_id`), | PRIMARY KEY (`account_id`), | ||
UNIQUE KEY `username` (`username`) | UNIQUE KEY `username` (`username`) | ||
− | ) ENGINE=InnoDB | + | ) ENGINE=InnoDB EFAULT CHARSET=utf8; |
</pre> | </pre> | ||
Revision as of 12:47, 26 December 2008
Database Table - Accounts
SWGANH Wiki is a repository of Star Wars Galaxies Developer information. This site is only meant to be used by SWGANH Developer team.
Table Create Script
DROP TABLE IF EXISTS `account`; CREATE TABLE `account` ( `account_id` bigint(20) unsigned NOT NULL auto_increment COMMENT 'Account ID', `username` char(32) NOT NULL default '' COMMENT 'Account username', `password` char(64) NOT NULL COMMENT 'Account password', `station_id` bigint(20) unsigned NOT NULL default '0' COMMENT 'Account STATION_ID', `csr` tinyint(1) NOT NULL default '0' COMMENT 'Account - CSR Flag', `banned` tinyint(1) NOT NULL default '0' COMMENT 'Account - Banned Status', `email` char(64) NOT NULL default '' COMMENT 'Account - User email', `joindate` datetime NOT NULL default '0000-00-00 00:00:00' COMMENT 'Account - Join Date', `lastlogin` timestamp NULL default NULL COMMENT 'Account - Last Login Timestamp', `active` tinyint(1) default NULL COMMENT 'Account - Active Flag', `loggedin` int(1) NOT NULL default '0' COMMENT 'Account - Cluster id account is logged into', `authenticated` tinyint(1) NOT NULL default '0' COMMENT 'Account - Authenticated Status', `characters_allowed` tinyint(3) unsigned NOT NULL default '2', `session_key` varchar(32) default NULL, PRIMARY KEY (`account_id`), UNIQUE KEY `username` (`username`) ) ENGINE=InnoDB EFAULT CHARSET=utf8;
Table Describe
mysql> describe account; +--------------------+---------------------+------+-----+---------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------------+---------------------+------+-----+---------------------+----------------+ | account_id | bigint(20) unsigned | NO | PRI | NULL | auto_increment | | username | char(32) | NO | UNI | | | | password | char(32) | NO | | | | | station_id | bigint(20) unsigned | NO | | 0 | | | csr | tinyint(1) | NO | | 0 | | | banned | tinyint(1) | NO | | 0 | | | email | char(64) | NO | | | | | joindate | datetime | NO | | 0000-00-00 00:00:00 | | | lastlogin | timestamp | YES | | NULL | | | active | tinyint(1) | YES | | NULL | | | loggedin | int(1) | NO | | 0 | | | authenticated | tinyint(1) | NO | | 0 | | | characters_allowed | tinyint(3) unsigned | NO | | 2 | | +--------------------+---------------------+------+-----+---------------------+----------------+ 13 rows in set (0.00 sec)