mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/SQL: Add unique table key for (guid, bag, slot) in character_inventory to prevent storing different item entities in the same slot.
NOTE: If you get import errors it's YOUR OWN RESPONSIBILITY to fix current data inconsistencies your database might have.
This commit is contained in:
@@ -669,6 +669,7 @@ CREATE TABLE `character_inventory` (
|
||||
`slot` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`item` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Item Global Unique Identifier',
|
||||
PRIMARY KEY (`item`),
|
||||
UNIQUE KEY (`guid`,`bag`,`slot`),
|
||||
KEY `idx_guid` (`guid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player System';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
Reference in New Issue
Block a user