summaryrefslogtreecommitdiff
path: root/sql-files/main.sql
diff options
context:
space:
mode:
authorkenpachi2k11 <kenpachi2k11@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-24 10:30:54 +0000
committerkenpachi2k11 <kenpachi2k11@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-24 10:30:54 +0000
commitb35718cad265492d13e67c600855a8a45d5c1fbb (patch)
tree4d1cff5eb4365be1f19b8769f53c599e94f41b47 /sql-files/main.sql
parent0158bf00e1ee3ba27878dff9ad2af488055bcd24 (diff)
downloadhercules-b35718cad265492d13e67c600855a8a45d5c1fbb.tar.gz
hercules-b35718cad265492d13e67c600855a8a45d5c1fbb.tar.bz2
hercules-b35718cad265492d13e67c600855a8a45d5c1fbb.tar.xz
hercules-b35718cad265492d13e67c600855a8a45d5c1fbb.zip
Made field `name` in `char` table unique to prevent 3rd party tools from making our data messy. (bugreport:5587)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16490 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'sql-files/main.sql')
-rw-r--r--sql-files/main.sql3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql-files/main.sql b/sql-files/main.sql
index a07487208..d4cef4ab8 100644
--- a/sql-files/main.sql
+++ b/sql-files/main.sql
@@ -54,7 +54,7 @@ CREATE TABLE IF NOT EXISTS `char` (
`char_id` int(11) unsigned NOT NULL auto_increment,
`account_id` int(11) unsigned NOT NULL default '0',
`char_num` tinyint(1) NOT NULL default '0',
- `name` varchar(30) NOT NULL default '',
+ `name` varchar(30) NOT NULL DEFAULT '',
`class` smallint(6) unsigned NOT NULL default '0',
`base_level` smallint(6) unsigned NOT NULL default '1',
`job_level` smallint(6) unsigned NOT NULL default '1',
@@ -105,6 +105,7 @@ CREATE TABLE IF NOT EXISTS `char` (
`rename` SMALLINT(3) unsigned NOT NULL default '0',
`delete_date` INT(11) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`char_id`),
+ UNIQUE KEY `name_key` (`name`),
KEY `account_id` (`account_id`),
KEY `party_id` (`party_id`),
KEY `guild_id` (`guild_id`),