aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2017-04-03 01:05:17 -0300
committerfunjoker <funjoker109@gmail.com>2020-04-27 12:25:52 +0200
commit1e294f753ed26097f9cbdf7b9ee1432862ed3260 (patch)
treee1d8fe8c5d6d156b3228227d4693bae2ae8d3f2a
parent14cf4c06921be90a7f5b9bba6ed110a2b8a7633c (diff)
DB/Schema: add unsigned to some guid fields in characters
(cherry picked from commit 0c698b4567044f67eb52f6459308fb6edf693966)
-rw-r--r--sql/base/characters_database.sql15
-rw-r--r--sql/updates/characters/master/2020_04_25_00_characters_2017_04_03_00_characters.sql11
2 files changed, 19 insertions, 7 deletions
diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql
index 23240d7d96c..302bcbb918c 100644
--- a/sql/base/characters_database.sql
+++ b/sql/base/characters_database.sql
@@ -481,9 +481,9 @@ DROP TABLE IF EXISTS `character_arena_stats`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `character_arena_stats` (
- `guid` bigint(20) NOT NULL,
- `slot` tinyint(3) NOT NULL,
- `matchMakerRating` smallint(5) NOT NULL,
+ `guid` bigint(20) unsigned NOT NULL DEFAULT '0',
+ `slot` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `matchMakerRating` smallint(5) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`guid`,`slot`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -738,8 +738,8 @@ DROP TABLE IF EXISTS `character_equipmentsets`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `character_equipmentsets` (
- `guid` bigint(20) NOT NULL DEFAULT '0',
- `setguid` bigint(20) NOT NULL AUTO_INCREMENT,
+ `guid` bigint(20) unsigned NOT NULL DEFAULT '0',
+ `setguid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`setindex` tinyint(3) unsigned NOT NULL DEFAULT '0',
`name` varchar(31) NOT NULL,
`iconname` varchar(100) NOT NULL,
@@ -3180,7 +3180,7 @@ DROP TABLE IF EXISTS `item_loot_money`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `item_loot_money` (
- `container_id` bigint(20) NOT NULL DEFAULT '0' COMMENT 'guid of container (item_instance.guid)',
+ `container_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'guid of container (item_instance.guid)',
`money` int(10) NOT NULL DEFAULT '0' COMMENT 'money loot (in copper)',
PRIMARY KEY (`container_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -3771,7 +3771,8 @@ INSERT INTO `updates` VALUES
('2019_12_05_00_characters.sql','EA381C9634A5646A3168F15DF4E06A708A622762','RELEASED','2019-12-05 20:56:58',0),
('2020_02_17_00_characters.sql','E1519A81D35F19B48B3C75A83A270CB4BA0B84F2','RELEASED','2020-02-17 21:55:17',0),
('2020_04_20_00_characters.sql','977B5E0C894E0A7E80B2A9626F17CA636A69BD22','RELEASED','2020-04-20 19:08:18',0),
-('2020_04_24_00_characters.sql','85E2E0395A9457A53D73A9E0A7BB39B7E4C429BF','RELEASED','2020-04-24 22:04:59',0);
+('2020_04_24_00_characters.sql','85E2E0395A9457A53D73A9E0A7BB39B7E4C429BF','RELEASED','2020-04-24 22:04:59',0),
+('2020_04_25_00_characters_2017_04_03_00_characters.sql','00FA3EFADAF807AC96619A3FE47216E21C3FCB19','RELEASED','2020-04-25 00:00:00',0);
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
UNLOCK TABLES;
diff --git a/sql/updates/characters/master/2020_04_25_00_characters_2017_04_03_00_characters.sql b/sql/updates/characters/master/2020_04_25_00_characters_2017_04_03_00_characters.sql
new file mode 100644
index 00000000000..3a962753a55
--- /dev/null
+++ b/sql/updates/characters/master/2020_04_25_00_characters_2017_04_03_00_characters.sql
@@ -0,0 +1,11 @@
+ALTER TABLE `character_arena_stats`
+CHANGE `guid` `guid` BIGINT(20) unsigned NOT NULL DEFAULT '0',
+CHANGE `slot` `slot` TINYINT(3) unsigned NOT NULL DEFAULT '0',
+CHANGE `matchMakerRating` `matchMakerRating` SMALLINT(5) unsigned NOT NULL DEFAULT 0;
+
+ALTER TABLE `character_equipmentsets`
+CHANGE `guid` `guid` BIGINT(20) unsigned NOT NULL DEFAULT '0',
+CHANGE `setguid` `setguid` BIGINT(20) unsigned NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `item_loot_money`
+CHANGE `container_id` `container_id` BIGINT(20) unsigned NOT NULL DEFAULT '0' COMMENT 'guid of container (item_instance.guid)';