Fix database scheme comments that got clobbered on nullptr conversion

This commit is contained in:
Michael Cook (mackal) 2013-11-11 15:37:20 -05:00
parent 2be71fc2ec
commit 925e19b15c
6 changed files with 82 additions and 82 deletions

View File

@ -74,11 +74,11 @@ To use ptimers, you need to create the table below in your DB:
Schema: Schema:
CREATE TABLE timers ( CREATE TABLE timers (
char_id INT(11) NOT nullptr, char_id INT(11) NOT NULL,
type MEDIUMINT UNSIGNED NOT nullptr, type MEDIUMINT UNSIGNED NOT NULL,
start INT UNSIGNED NOT nullptr, start INT UNSIGNED NOT NULL,
duration INT UNSIGNED NOT nullptr, duration INT UNSIGNED NOT NULL,
enable TINYINT NOT nullptr, enable TINYINT NOT NULL,
PRIMARY KEY(char_id, type) PRIMARY KEY(char_id, type)
); );

View File

@ -35,17 +35,17 @@ Requred SQL:
CREATE TABLE rule_sets ( CREATE TABLE rule_sets (
ruleset_id TINYINT UNSIGNED NOT nullptr auto_increment, ruleset_id TINYINT UNSIGNED NOT NULL auto_increment,
name VARCHAR(255) NOT nullptr, name VARCHAR(255) NOT NULL,
PRIMARY KEY(ruleset_id) PRIMARY KEY(ruleset_id)
); );
INSERT INTO rule_sets VALUES(0, "default"); INSERT INTO rule_sets VALUES(0, "default");
UPDATE rule_sets SET ruleset_id=0; UPDATE rule_sets SET ruleset_id=0;
CREATE TABLE rule_values ( CREATE TABLE rule_values (
ruleset_id TINYINT UNSIGNED NOT nullptr, ruleset_id TINYINT UNSIGNED NOT NULL,
rule_name VARCHAR(64) NOT nullptr, rule_name VARCHAR(64) NOT NULL,
rule_value VARCHAR(10) NOT nullptr, rule_value VARCHAR(10) NOT NULL,
INDEX(ruleset_id), INDEX(ruleset_id),
PRIMARY KEY(ruleset_id,rule_name) PRIMARY KEY(ruleset_id,rule_name)
); );

View File

@ -56,27 +56,27 @@ very low chance of dropping.
Schema: Schema:
CREATE TABLE forage ( CREATE TABLE forage (
id int(11) NOT nullptr auto_increment, id int(11) NOT NULL auto_increment,
zoneid int(4) NOT nullptr default '0', zoneid int(4) NOT NULL default '0',
Itemid int(11) NOT nullptr default '0', Itemid int(11) NOT NULL default '0',
level smallint(6) NOT nullptr default '0', level smallint(6) NOT NULL default '0',
chance smallint(6) NOT nullptr default '0', chance smallint(6) NOT NULL default '0',
PRIMARY KEY (id) PRIMARY KEY (id)
) TYPE=MyISAM; ) TYPE=MyISAM;
old table upgrade: old table upgrade:
alter table forage add chance smallint(6) NOT nullptr default '0'; alter table forage add chance smallint(6) NOT NULL default '0';
update forage set chance=100; update forage set chance=100;
CREATE TABLE fishing ( CREATE TABLE fishing (
id int(11) NOT nullptr auto_increment, id int(11) NOT NULL auto_increment,
zoneid int(4) NOT nullptr default '0', zoneid int(4) NOT NULL default '0',
Itemid int(11) NOT nullptr default '0', Itemid int(11) NOT NULL default '0',
skill_level smallint(6) NOT nullptr default '0', skill_level smallint(6) NOT NULL default '0',
chance smallint(6) NOT nullptr default '0', chance smallint(6) NOT NULL default '0',
npc_id int NOT nullptr default 0, npc_id int NOT NULL default 0,
npc_chance int NOT nullptr default 0, npc_chance int NOT NULL default 0,
PRIMARY KEY (id) PRIMARY KEY (id)
) TYPE=MyISAM; ) TYPE=MyISAM;

View File

@ -27,49 +27,49 @@
/* /*
CREATE TABLE guilds ( CREATE TABLE guilds (
id MEDIUMINT UNSIGNED NOT nullptr, id MEDIUMINT UNSIGNED NOT NULL,
name VARCHAR(32) NOT nullptr, name VARCHAR(32) NOT NULL,
leader int NOT nullptr, leader int NOT NULL,
minstatus SMALLINT NOT nullptr, minstatus SMALLINT NOT NULL,
tribute INT UNSIGNED NOT nullptr, tribute INT UNSIGNED NOT NULL,
motd TEXT NOT nullptr DEFAULT '', motd TEXT NOT NULL DEFAULT '',
PRIMARY KEY(id), PRIMARY KEY(id),
UNIQUE KEY(name), UNIQUE KEY(name),
UNIQUE KEY(leader) UNIQUE KEY(leader)
); );
CREATE TABLE guild_ranks ( CREATE TABLE guild_ranks (
guild_id MEDIUMINT UNSIGNED NOT nullptr, guild_id MEDIUMINT UNSIGNED NOT NULL,
rank TINYINT UNSIGNED NOT nullptr, rank TINYINT UNSIGNED NOT NULL,
title VARCHAR(128) NOT nullptr, title VARCHAR(128) NOT NULL,
can_hear TINYINT UNSIGNED NOT nullptr, can_hear TINYINT UNSIGNED NOT NULL,
can_speak TINYINT UNSIGNED NOT nullptr, can_speak TINYINT UNSIGNED NOT NULL,
can_invite TINYINT UNSIGNED NOT nullptr, can_invite TINYINT UNSIGNED NOT NULL,
can_remove TINYINT UNSIGNED NOT nullptr, can_remove TINYINT UNSIGNED NOT NULL,
can_promote TINYINT UNSIGNED NOT nullptr, can_promote TINYINT UNSIGNED NOT NULL,
can_demote TINYINT UNSIGNED NOT nullptr, can_demote TINYINT UNSIGNED NOT NULL,
can_motd TINYINT UNSIGNED NOT nullptr, can_motd TINYINT UNSIGNED NOT NULL,
can_warpeace TINYINT UNSIGNED NOT nullptr, can_warpeace TINYINT UNSIGNED NOT NULL,
PRIMARY KEY(guild_id,rank) PRIMARY KEY(guild_id,rank)
); );
# guild1 < guild2 by definition. # guild1 < guild2 by definition.
CREATE TABLE guild_relations ( CREATE TABLE guild_relations (
guild1 MEDIUMINT UNSIGNED NOT nullptr, guild1 MEDIUMINT UNSIGNED NOT NULL,
guild2 MEDIUMINT UNSIGNED NOT nullptr, guild2 MEDIUMINT UNSIGNED NOT NULL,
relation TINYINT NOT nullptr, relation TINYINT NOT NULL,
PRIMARY KEY(guild1, guild1) PRIMARY KEY(guild1, guild1)
); );
CREATE TABLE guild_members ( CREATE TABLE guild_members (
char_id INT NOT nullptr, char_id INT NOT NULL,
guild_id MEDIUMINT UNSIGNED NOT nullptr, guild_id MEDIUMINT UNSIGNED NOT NULL,
rank TINYINT UNSIGNED NOT nullptr, rank TINYINT UNSIGNED NOT NULL,
tribute_enable TINYINT UNSIGNED NOT nullptr DEFAULT 0, tribute_enable TINYINT UNSIGNED NOT NULL DEFAULT 0,
total_tribute INT UNSIGNED NOT nullptr DEFAULT 0, total_tribute INT UNSIGNED NOT NULL DEFAULT 0,
last_tribute INT UNSIGNED NOT nullptr DEFAULT 0, last_tribute INT UNSIGNED NOT NULL DEFAULT 0,
banker TINYINT UNSIGNED NOT nullptr DEFAULT 0, banker TINYINT UNSIGNED NOT NULL DEFAULT 0,
public_note TEXT NOT nullptr DEFAULT '', public_note TEXT NOT NULL DEFAULT '',
PRIMARY KEY(char_id) PRIMARY KEY(char_id)
); );

View File

@ -34,33 +34,33 @@ extern WorldServer worldserver;
/* /*
CREATE TABLE spawn_conditions ( CREATE TABLE spawn_conditions (
zone VARCHAR(16) NOT nullptr, zone VARCHAR(16) NOT NULL,
id MEDIUMINT UNSIGNED NOT nullptr DEFAULT '1', id MEDIUMINT UNSIGNED NOT NULL DEFAULT '1',
value MEDIUMINT NOT nullptr DEFAULT '0', value MEDIUMINT NOT NULL DEFAULT '0',
onchange TINYINT UNSIGNED NOT nullptr DEFAULT '0', onchange TINYINT UNSIGNED NOT NULL DEFAULT '0',
name VARCHAR(255) NOT nullptr DEFAULT '', name VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY(zone,id) PRIMARY KEY(zone,id)
); );
CREATE TABLE spawn_events ( CREATE TABLE spawn_events (
#identifiers #identifiers
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
zone VARCHAR(16) NOT nullptr, zone VARCHAR(16) NOT NULL,
cond_id MEDIUMINT UNSIGNED NOT nullptr, cond_id MEDIUMINT UNSIGNED NOT NULL,
name VARCHAR(255) NOT nullptr DEFAULT '', name VARCHAR(255) NOT NULL DEFAULT '',
#timing information #timing information
period INT UNSIGNED NOT nullptr, period INT UNSIGNED NOT NULL,
next_minute TINYINT UNSIGNED NOT nullptr, next_minute TINYINT UNSIGNED NOT NULL,
next_hour TINYINT UNSIGNED NOT nullptr, next_hour TINYINT UNSIGNED NOT NULL,
next_day TINYINT UNSIGNED NOT nullptr, next_day TINYINT UNSIGNED NOT NULL,
next_month TINYINT UNSIGNED NOT nullptr, next_month TINYINT UNSIGNED NOT NULL,
next_year INT UNSIGNED NOT nullptr, next_year INT UNSIGNED NOT NULL,
enabled TINYINT NOT nullptr DEFAULT '1', enabled TINYINT NOT NULL DEFAULT '1',
#action: #action:
action TINYINT UNSIGNED NOT nullptr DEFAULT '0', action TINYINT UNSIGNED NOT NULL DEFAULT '0',
argument MEDIUMINT NOT nullptr DEFAULT '0' argument MEDIUMINT NOT NULL DEFAULT '0'
); );
*/ */

View File

@ -27,20 +27,20 @@
Schema: Schema:
CREATE TABLE traps ( CREATE TABLE traps (
id int(11) NOT nullptr auto_increment, id int(11) NOT NULL auto_increment,
zone varchar(16) NOT nullptr default '', zone varchar(16) NOT NULL default '',
x int(11) NOT nullptr default '0', x int(11) NOT NULL default '0',
y int(11) NOT nullptr default '0', y int(11) NOT NULL default '0',
z int(11) NOT nullptr default '0', z int(11) NOT NULL default '0',
chance tinyint NOT nullptr default '0', chance tinyint NOT NULL default '0',
maxzdiff float NOT nullptr default '0', maxzdiff float NOT NULL default '0',
radius float NOT nullptr default '0', radius float NOT NULL default '0',
effect int(11) NOT nullptr default '0', effect int(11) NOT NULL default '0',
effectvalue int(11) NOT nullptr default '0', effectvalue int(11) NOT NULL default '0',
effectvalue2 int(11) NOT nullptr default '0', effectvalue2 int(11) NOT NULL default '0',
message varcahr(200) NOT nullptr; message varcahr(200) NOT NULL;
skill int(11) NOT nullptr default '0', skill int(11) NOT NULL default '0',
spawnchance int(11) NOT nullptr default '0', spawnchance int(11) NOT NULL default '0',
PRIMARY KEY (id) PRIMARY KEY (id)
) TYPE=MyISAM; ) TYPE=MyISAM;