aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorAzazel <azazel.kon@gmail.com>2011-04-11 14:39:00 +0600
committerAzazel <azazel.kon@gmail.com>2011-04-11 14:39:00 +0600
commit5357b1ba7773801bff66c3bbffe3d2b7c73847ad (patch)
tree65034ec3452729e767895bfd228b87a8122866d3 /sql
parent553d8d70165eb9256c85801a47b69da7e18159ca (diff)
Core/CharDB Cleanup: alter `corpse` table making column names lowerCamel and move all queries to prepared statements.
NOTICE: column can be named `guid` only if it represents character guid. All other guids will be renamed to reflect their purpose (like corpseGuid in this specific case)
Diffstat (limited to 'sql')
-rw-r--r--sql/base/characters_database.sql20
-rw-r--r--sql/updates/auth_char/2011_04_11_00_characters_corpse.sql10
2 files changed, 20 insertions, 10 deletions
diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql
index bca9371d571..2b94f5e70ef 100644
--- a/sql/base/characters_database.sql
+++ b/sql/base/characters_database.sql
@@ -1194,27 +1194,27 @@ DROP TABLE IF EXISTS `corpse`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `corpse` (
- `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier',
- `player` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Character Global Unique Identifier',
- `position_x` float NOT NULL DEFAULT '0',
- `position_y` float NOT NULL DEFAULT '0',
- `position_z` float NOT NULL DEFAULT '0',
+ `corpseGuid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier',
+ `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Character Global Unique Identifier',
+ `posX` float NOT NULL DEFAULT '0',
+ `posY` float NOT NULL DEFAULT '0',
+ `posZ` float NOT NULL DEFAULT '0',
`orientation` float NOT NULL DEFAULT '0',
- `map` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Map Identifier',
+ `mapId` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Map Identifier',
`phaseMask` smallint(5) unsigned NOT NULL DEFAULT '1',
`displayId` int(10) unsigned NOT NULL DEFAULT '0',
`itemCache` text NOT NULL,
`bytes1` int(10) unsigned NOT NULL DEFAULT '0',
`bytes2` int(10) unsigned NOT NULL DEFAULT '0',
- `guild` int(10) unsigned NOT NULL DEFAULT '0',
+ `guildId` int(10) unsigned NOT NULL DEFAULT '0',
`flags` tinyint(3) unsigned NOT NULL DEFAULT '0',
`dynFlags` tinyint(3) unsigned NOT NULL DEFAULT '0',
`time` int(10) unsigned NOT NULL DEFAULT '0',
- `corpse_type` tinyint(3) unsigned NOT NULL DEFAULT '0',
- `instance` int(10) unsigned NOT NULL DEFAULT '0',
+ `corpseType` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `instanceId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Instance Identifier',
PRIMARY KEY (`guid`),
KEY `idx_type` (`corpse_type`),
- KEY `instance` (`instance`),
+ KEY `instance` (`instanceId`),
KEY `Idx_player` (`player`),
KEY `Idx_time` (`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Death System';
diff --git a/sql/updates/auth_char/2011_04_11_00_characters_corpse.sql b/sql/updates/auth_char/2011_04_11_00_characters_corpse.sql
new file mode 100644
index 00000000000..af3aaedde4f
--- /dev/null
+++ b/sql/updates/auth_char/2011_04_11_00_characters_corpse.sql
@@ -0,0 +1,10 @@
+ALTER TABLE `corpse`
+ CHANGE `guid` `corpseGuid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier',
+ CHANGE `player` `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Character Global Unique Identifier',
+ CHANGE `map` `mapId` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Map Identifier',
+ CHANGE `position_x` `posX` float NOT NULL DEFAULT '0',
+ CHANGE `position_y` `posY` float NOT NULL DEFAULT '0',
+ CHANGE `position_z` `posZ` float NOT NULL DEFAULT '0',
+ CHANGE `guild` `guildId` int(10) unsigned NOT NULL DEFAULT '0',
+ CHANGE `corpse_type` `corpseType` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ CHANGE `instance` `instanceId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Instance Identifier';