Zone regions (Database Table)

From SWGANH Wiki
Revision as of 12:54, 26 December 2008 by Snow (Talk | contribs) (New page: {{PageHeader|Database Table|Accounts}} {| border="0" width="90%" cellpadding=6 |- |valign=top| ==Table Structure== {| align="center" |- || {| class = "anhsmalltable" |- align="center" sty...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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
account_id bigint(20) Symbol OK.png Symbol OK.png NO Primary Null Account ID
username char(32) NO Unique Account Username
password char(32) NO Account Password (MD5)
station_id bigint(20) Symbol OK.png NO Account STATION_ID
csr tinyint(1) NO Account flag (CSR)
banned tinyint(1) NO Account flag (Banned)
email char(64) NO Account email.
joindate datetime NO 0000-00-00 00:00:00 Date/Time of account creation.
lastlogin timestamp YES NULL Date/Time of last login.
active tinyint(1) YES NULL User account active.
loggedin int(1) NO 0 Logged in.
authenticated tinyint(1) YES 0 Authenicated with Login Server.
characters_allowed tinyint(3) Symbol OK.png NO 2 Characters allowed per galaxy.
session_key varchar(32) NO Launcher session key

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)