summaryrefslogtreecommitdiff
path: root/sql-files/main.sql
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-02-06 16:00:04 -0300
committerJesusaves <cpntb1@ymail.com>2022-02-06 16:00:04 -0300
commitddbccc0054a64f5e7a8c391e34e2d319051acc11 (patch)
tree457e1c5560c550091c92ab41ec37fe8d54fb07c0 /sql-files/main.sql
parent39465ad04d239390d812354149f9d32460fbba7e (diff)
downloadserverdata-ddbccc0054a64f5e7a8c391e34e2d319051acc11.tar.gz
serverdata-ddbccc0054a64f5e7a8c391e34e2d319051acc11.tar.bz2
serverdata-ddbccc0054a64f5e7a8c391e34e2d319051acc11.tar.xz
serverdata-ddbccc0054a64f5e7a8c391e34e2d319051acc11.zip
Some (minor) SQL updates, such as making login UNIQUE.
Also, what's wrong with valgrind.
Diffstat (limited to 'sql-files/main.sql')
-rw-r--r--sql-files/main.sql58
1 files changed, 29 insertions, 29 deletions
diff --git a/sql-files/main.sql b/sql-files/main.sql
index e248fdc82..5aa064ac0 100644
--- a/sql-files/main.sql
+++ b/sql-files/main.sql
@@ -51,7 +51,7 @@ CREATE TABLE IF NOT EXISTS `acc_reg_str_db` (
`account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`key` VARCHAR(32) BINARY NOT NULL DEFAULT '',
`index` INT(11) UNSIGNED NOT NULL DEFAULT '0',
- `value` VARCHAR(254) NOT NULL DEFAULT '0',
+ `value` VARCHAR(255) NOT NULL DEFAULT '0',
PRIMARY KEY (`account_id`,`key`,`index`),
KEY `account_id` (`account_id`)
) ENGINE=MyISAM;
@@ -276,7 +276,7 @@ CREATE TABLE IF NOT EXISTS `char_reg_str_db` (
`char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`key` VARCHAR(32) BINARY NOT NULL DEFAULT '',
`index` INT(11) UNSIGNED NOT NULL DEFAULT '0',
- `value` VARCHAR(254) NOT NULL DEFAULT '0',
+ `value` VARCHAR(255) NOT NULL DEFAULT '0',
PRIMARY KEY (`char_id`,`key`,`index`),
KEY `char_id` (`char_id`)
) ENGINE=MyISAM;
@@ -335,23 +335,23 @@ CREATE TABLE IF NOT EXISTS `patreon` (
--
CREATE TABLE IF NOT EXISTS `elemental` (
- `ele_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
- `char_id` INT(11) NOT NULL,
- `class` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0',
- `mode` INT(11) UNSIGNED NOT NULL DEFAULT '1',
- `hp` INT(12) NOT NULL DEFAULT '1',
- `sp` INT(12) NOT NULL DEFAULT '1',
- `max_hp` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
- `max_sp` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT '0',
- `atk1` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT '0',
- `atk2` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT '0',
- `matk` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT '0',
- `aspd` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0',
- `def` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0',
- `mdef` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0',
- `flee` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0',
- `hit` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0',
- `life_time` INT(11) NOT NULL DEFAULT '0',
+ `ele_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
+ `char_id` INT NOT NULL,
+ `class` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0',
+ `mode` INT UNSIGNED NOT NULL DEFAULT '1',
+ `hp` INT NOT NULL DEFAULT '1',
+ `sp` INT NOT NULL DEFAULT '1',
+ `max_hp` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0',
+ `max_sp` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0',
+ `atk1` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0',
+ `atk2` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0',
+ `matk` MEDIUMINT UNSIGNED NOT NULL DEFAULT '0',
+ `aspd` SMALLINT UNSIGNED NOT NULL DEFAULT '0',
+ `def` SMALLINT UNSIGNED NOT NULL DEFAULT '0',
+ `mdef` SMALLINT UNSIGNED NOT NULL DEFAULT '0',
+ `flee` SMALLINT UNSIGNED NOT NULL DEFAULT '0',
+ `hit` SMALLINT UNSIGNED NOT NULL DEFAULT '0',
+ `life_time` INT NOT NULL DEFAULT '0',
PRIMARY KEY (`ele_id`)
) ENGINE=MyISAM;
@@ -400,7 +400,7 @@ CREATE TABLE IF NOT EXISTS `global_acc_reg_str_db` (
`account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`key` VARCHAR(32) BINARY NOT NULL DEFAULT '',
`index` INT(11) UNSIGNED NOT NULL DEFAULT '0',
- `value` VARCHAR(254) NOT NULL DEFAULT '0',
+ `value` VARCHAR(255) NOT NULL DEFAULT '0',
PRIMARY KEY (`account_id`,`key`,`index`),
KEY `account_id` (`account_id`)
) ENGINE=MyISAM;
@@ -578,12 +578,12 @@ CREATE TABLE IF NOT EXISTS `homunculus` (
`exp` INT(12) NOT NULL DEFAULT '0',
`intimacy` INT(12) NOT NULL DEFAULT '0',
`hunger` SMALLINT(4) NOT NULL DEFAULT '0',
- `str` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0',
- `agi` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0',
- `vit` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0',
- `INT` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0',
- `dex` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0',
- `luk` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0',
+ `str` SMALLINT UNSIGNED NOT NULL DEFAULT '0',
+ `agi` SMALLINT UNSIGNED NOT NULL DEFAULT '0',
+ `vit` SMALLINT UNSIGNED NOT NULL DEFAULT '0',
+ `INT` SMALLINT UNSIGNED NOT NULL DEFAULT '0',
+ `dex` SMALLINT UNSIGNED NOT NULL DEFAULT '0',
+ `luk` SMALLINT UNSIGNED NOT NULL DEFAULT '0',
`hp` INT(12) NOT NULL DEFAULT '1',
`max_hp` INT(12) NOT NULL DEFAULT '1',
`sp` INT(12) NOT NULL DEFAULT '1',
@@ -650,7 +650,7 @@ CREATE TABLE IF NOT EXISTS `ipbanlist` (
`rtime` DATETIME NULL,
`reason` VARCHAR(255) NOT NULL DEFAULT '',
KEY (`list`(39))
-) ENGINE=MyISAM;
+) ENGINE=MyISAM; -- Move to InnoDB ?
--
-- Table structure for table `login`
@@ -658,7 +658,7 @@ CREATE TABLE IF NOT EXISTS `ipbanlist` (
CREATE TABLE IF NOT EXISTS `login` (
`account_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
- `userid` VARCHAR(23) NOT NULL DEFAULT '',
+ `userid` VARCHAR(23) NOT NULL,
`user_pass` VARCHAR(64) NOT NULL DEFAULT '',
`sex` ENUM('M','F','S') NOT NULL DEFAULT 'M',
`email` VARCHAR(39) NOT NULL DEFAULT '',
@@ -674,7 +674,7 @@ CREATE TABLE IF NOT EXISTS `login` (
`pincode` VARCHAR(4) NOT NULL DEFAULT '',
`pincode_change` INT(11) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`account_id`),
- KEY `name` (`userid`)
+ UNIQUE KEY `name` (`userid`)
) ENGINE=MyISAM AUTO_INCREMENT=2000000;
-- added standard accounts for servers, VERY INSECURE!!!