Difference between revisions of "Zone regions (Database Table)"

From SWGANH Wiki
Jump to: navigation, search
(New page: {{PageHeader|Database Table|Accounts}} {| border="0" width="90%" cellpadding=6 |- |valign=top| ==Table Structure== {| align="center" |- || {| class = "anhsmalltable" |- align="center" sty...)
 
(Table Structure)
Line 11: Line 11:
 
|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'''
 
|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="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="left"|id||int(11)||align="center"|[[Image:Symbol OK.png|10px]]||align="center"|[[Image:Symbol OK.png|10px]]||NO||Primary|| ||Zone Region ID
 
|- align="center" style="background-color:#F1F1F1;"
 
|- align="center" style="background-color:#F1F1F1;"
|align="left"|username||char(32)||align="center"| ||align="center"| ||NO||Unique|| ||Account Username
+
|align="left"|region_id||int(11)||align="center"|[[Image:Symbol OK.png|10px]]||align="center"| ||NO|| ||1||Region ID
 
|- align="center"  
 
|- align="center"  
|align="left"|password||char(32)||align="center"| ||align="center"| ||NO|| || ||Account Password (MD5)
+
|align="left"|planet_id||int(2)||align="center"| ||align="center"| ||NO|| ||0||Planet ID
 
|- align="center" style="background-color:#F1F1F1;"
 
|- 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="left"|qtDepth||int(2)||align="center"|[[Image:Symbol OK.png|10px]]||align="center"| ||NO|| ||8||Quad Tree Depth
 
|- align="center"  
 
|- 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
 
|-
 
 
|}
 
|}
 
|}
 
|}

Revision as of 12:59, 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 Structure

Field Type Unsigned Autoinc Null Key Default Value Description
id int(11) Symbol OK.png Symbol OK.png NO Primary Zone Region ID
region_id int(11) Symbol OK.png NO 1 Region ID
planet_id int(2) NO 0 Planet ID
qtDepth int(2) Symbol OK.png NO 8 Quad Tree Depth

Related Tags

75% This document is nearing completion.

Database This document relates to the SWGANH Database Schema.

DB Table This document relates to the SWGANH Database Schema.


Table Create Script

DROP TABLE IF EXISTS `zone_regions`;
CREATE TABLE `zone_regions` (
  `Id` int(11) unsigned NOT NULL auto_increment,
  `region_id` int(11) unsigned NOT NULL default '1',
  `planet_id` int(2) NOT NULL default '0',
  `qtDepth` int(2) unsigned NOT NULL default '8',
  PRIMARY KEY  (`Id`),
  KEY `fk_zone_region` (`region_id`),
  KEY `fk_zone_planet` (`planet_id`),
  CONSTRAINT `fk_zone_region` FOREIGN KEY (`region_id`) REFERENCES `planet_regions` (`region_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_zone_planet` FOREIGN KEY (`planet_id`) REFERENCES `planet` (`planet_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;

Table Describe

mysql> desc zone_regions;
+-----------+------------------+------+-----+---------+----------------+
| Field     | Type             | Null | Key | Default | Extra          |
+-----------+------------------+------+-----+---------+----------------+
| Id        | int(11) unsigned | NO   | PRI | NULL    | auto_increment |
| region_id | int(11) unsigned | NO   | MUL | 1       |                |
| planet_id | int(2)           | NO   | MUL | 0       |                |
| qtDepth   | int(2) unsigned  | NO   |     | 8       |                |
+-----------+------------------+------+-----+---------+----------------+
4 rows in set (0.01 sec)