Difference between revisions of "Account (Database Table)"
From SWGANH Wiki
(→Table Create Script) |
m (→Table Create Script) |
||
(20 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{PageHeader|Database Table|Accounts}} | {{PageHeader|Database Table|Accounts}} | ||
− | + | {| border="0" width="90%" cellpadding=6 | |
+ | |- | ||
+ | |valign=top| | ||
==Table Structure== | ==Table Structure== | ||
{| align="center" | {| align="center" | ||
|- | |- | ||
|| | || | ||
− | {| class = " | + | {| class = "anhsmalltable" |
− | |- align="center" | + | |- align="center" style="background-color:#ffffcc;" |
− | ||'''Field'''||'''Type'''||'''Unsigned'''||'''Autoinc'''||'''Null'''||'''Key'''||'''Default Value'''||'''Description''' | + | |width="100px"|'''Field'''||width="60px"|'''Type'''||width="60px"|'''Unsigned'''||width="60px"|'''Autoinc'''||width="40px"|'''Null'''||width="40px"|'''Key'''||width="100px"|'''Default Value'''||width="200px"|'''Description''' |
+ | |- align="center" | ||
+ | |align="left"|account_id||bigint(20)||align="center"|[[Image:Symbol OK.png|10px]]||align="center"|[[Image:Symbol OK.png|10px]]||NO||Primary||Null||Account ID | ||
+ | |- align="center" style="background-color:#F1F1F1;" | ||
+ | |align="left"|username||char(32)||align="center"| ||align="center"| ||NO||Unique|| ||Account Username | ||
+ | |- align="center" | ||
+ | |align="left"|password||char(32)||align="center"| ||align="center"| ||NO|| || ||Account Password (MD5) | ||
+ | |- align="center" style="background-color:#F1F1F1;" | ||
+ | |align="left"|station_id||bigint(20)||align="center"|[[Image:Symbol OK.png|10px]]||align="center"| ||NO|| || ||Account STATION_ID | ||
+ | |- align="center" | ||
+ | |align="left"|csr||tinyint(1)||align="center"| ||align="center"| ||NO|| || ||Account flag (CSR) | ||
+ | |- align="center" style="background-color:#F1F1F1;" | ||
+ | |align="left"|banned||tinyint(1)||align="center"| ||align="center"| ||NO|| || ||Account flag (Banned) | ||
+ | |- align="center" | ||
+ | |align="left"|email||char(64)||align="center"| ||align="center"| ||NO|| || ||Account email. | ||
+ | |- align="center" style="background-color:#F1F1F1;" | ||
+ | |align="left"|joindate||datetime||align="center"| ||align="center"| ||NO|| ||0000-00-00 00:00:00||Date/Time of account creation. | ||
+ | |- align="center" | ||
+ | |align="left"|lastlogin||timestamp||align="center"| ||align="center"| ||YES|| ||NULL||Date/Time of last login. | ||
+ | |- align="center" style="background-color:#F1F1F1;" | ||
+ | |align="left"|active||tinyint(1)||align="center"| ||align="center"| ||YES|| ||NULL||User account active. | ||
+ | |- align="center" | ||
+ | |align="left"|loggedin||int(1)||align="center"| ||align="center"| ||NO|| ||0||Logged in. | ||
+ | |- align="center" style="background-color:#F1F1F1;" | ||
+ | |align="left"|authenticated||tinyint(1)||align="center"| ||align="center"| ||YES|| ||0||Authenicated with Login Server. | ||
+ | |- align="center" | ||
+ | |align="left"|characters_allowed||tinyint(3)||align="center"|[[Image:Symbol OK.png|10px]]||align="center"| ||NO|| ||2||Characters allowed per galaxy. | ||
+ | |- align="center" style="background-color:#F1F1F1;" | ||
+ | |align="left"|session_key||varchar(32)||align="center"| ||align="center"| ||NO|| || ||Launcher session key | ||
|- | |- | ||
− | || | + | |} |
+ | |} | ||
+ | |valign=top| | ||
+ | |||
+ | == Related Tags == | ||
+ | {|align="center" | ||
|- | |- | ||
− | || | + | ||{{D75%}} |
|- | |- | ||
− | || | + | ||{{Database}} |
|- | |- | ||
− | || | + | ||{{DatabaseTable}} |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
|} | |} | ||
|} | |} | ||
+ | |||
+ | |||
==Table Create Script== | ==Table Create Script== | ||
<pre> | <pre> | ||
− | |||
− | |||
− | |||
− | |||
DROP TABLE IF EXISTS `account`; | DROP TABLE IF EXISTS `account`; | ||
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 59: | Line 74: | ||
`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 DEFAULT CHARSET=utf8; | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
− | |||
</pre> | </pre> | ||
Line 71: | Line 86: | ||
| Field | Type | Null | Key | Default | Extra | | | Field | Type | Null | Key | Default | Extra | | ||
+--------------------+---------------------+------+-----+---------------------+----------------+ | +--------------------+---------------------+------+-----+---------------------+----------------+ | ||
− | | account_id | bigint(20) unsigned | NO | PRI | NULL | auto_increment | | + | | account_id | bigint(20) unsigned | NO | PRI | NULL | auto_increment | |
− | | username | char(32) | NO | UNI | | | | + | | username | char(32) | NO | UNI | | | |
− | | password | char( | + | | password | char(64) | NO | | NULL | | |
− | | station_id | bigint(20) unsigned | NO | | 0 | | | + | | station_id | bigint(20) unsigned | NO | | 0 | | |
− | | csr | tinyint(1) | NO | | 0 | | | + | | csr | tinyint(1) | NO | | 0 | | |
− | | banned | tinyint(1) | NO | | 0 | | | + | | banned | tinyint(1) | NO | | 0 | | |
− | | email | char(64) | NO | | | | | + | | email | char(64) | NO | | | | |
− | | joindate | datetime | NO | | 0000-00-00 00:00:00 | | | + | | joindate | datetime | NO | | 0000-00-00 00:00:00 | | |
− | | lastlogin | timestamp | YES | | NULL | | | + | | lastlogin | timestamp | YES | | NULL | | |
− | | active | tinyint(1) | YES | | NULL | | | + | | active | tinyint(1) | YES | | NULL | | |
− | | loggedin | int(1) | NO | | 0 | | | + | | loggedin | int(1) | NO | | 0 | | |
− | | authenticated | tinyint(1) | NO | | 0 | | | + | | authenticated | tinyint(1) | NO | | 0 | | |
− | | characters_allowed | tinyint(3) unsigned | NO | | 2 | | | + | | characters_allowed | tinyint(3) unsigned | NO | | 2 | | |
+ | | session_key | varchar(32) | YES | | NULL | | | ||
+--------------------+---------------------+------+-----+---------------------+----------------+ | +--------------------+---------------------+------+-----+---------------------+----------------+ | ||
− | + | 14 rows in set (0.01 sec) | |
</pre> | </pre> |
Latest revision as of 17:06, 9 May 2010
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 DEFAULT 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(64) | NO | | NULL | | | 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 | | | session_key | varchar(32) | YES | | NULL | | +--------------------+---------------------+------+-----+---------------------+----------------+ 14 rows in set (0.01 sec)