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:
CREATE TABLE timers (
char_id INT(11) NOT nullptr,
type MEDIUMINT UNSIGNED NOT nullptr,
start INT UNSIGNED NOT nullptr,
duration INT UNSIGNED NOT nullptr,
enable TINYINT NOT nullptr,
char_id INT(11) NOT NULL,
type MEDIUMINT UNSIGNED NOT NULL,
start INT UNSIGNED NOT NULL,
duration INT UNSIGNED NOT NULL,
enable TINYINT NOT NULL,
PRIMARY KEY(char_id, type)
);

View File

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

View File

@ -56,27 +56,27 @@ very low chance of dropping.
Schema:
CREATE TABLE forage (
id int(11) NOT nullptr auto_increment,
zoneid int(4) NOT nullptr default '0',
Itemid int(11) NOT nullptr default '0',
level smallint(6) NOT nullptr default '0',
chance smallint(6) NOT nullptr default '0',
id int(11) NOT NULL auto_increment,
zoneid int(4) NOT NULL default '0',
Itemid int(11) NOT NULL default '0',
level smallint(6) NOT NULL default '0',
chance smallint(6) NOT NULL default '0',
PRIMARY KEY (id)
) TYPE=MyISAM;
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;
CREATE TABLE fishing (
id int(11) NOT nullptr auto_increment,
zoneid int(4) NOT nullptr default '0',
Itemid int(11) NOT nullptr default '0',
skill_level smallint(6) NOT nullptr default '0',
chance smallint(6) NOT nullptr default '0',
npc_id int NOT nullptr default 0,
npc_chance int NOT nullptr default 0,
id int(11) NOT NULL auto_increment,
zoneid int(4) NOT NULL default '0',
Itemid int(11) NOT NULL default '0',
skill_level smallint(6) NOT NULL default '0',
chance smallint(6) NOT NULL default '0',
npc_id int NOT NULL default 0,
npc_chance int NOT NULL default 0,
PRIMARY KEY (id)
) TYPE=MyISAM;

View File

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

View File

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

View File

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