diff options
Diffstat (limited to 'sql-files')
-rw-r--r-- | sql-files/main.sql | 3 | ||||
-rw-r--r-- | sql-files/upgrade_svn16490.sql | 1 |
2 files changed, 3 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`), diff --git a/sql-files/upgrade_svn16490.sql b/sql-files/upgrade_svn16490.sql new file mode 100644 index 000000000..f3c7056ab --- /dev/null +++ b/sql-files/upgrade_svn16490.sql @@ -0,0 +1 @@ +ALTER TABLE `char` ADD CONSTRAINT `name_key` UNIQUE (`name`);
\ No newline at end of file |