diff options
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/characters.sql | 21 | ||||
| -rw-r--r-- | sql/updates/7705_characters_worldstates.sql | 9 |
2 files changed, 21 insertions, 9 deletions
diff --git a/sql/characters.sql b/sql/characters.sql index eaf6c9ee52e..bec2793647c 100644 --- a/sql/characters.sql +++ b/sql/characters.sql @@ -1863,24 +1863,27 @@ LOCK TABLES `petition_sign` WRITE; UNLOCK TABLES; -- --- Table structure for table `saved_variables` +-- Table structure for table `worldstates` -- -DROP TABLE IF EXISTS `saved_variables`; +DROP TABLE IF EXISTS `worldstates`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `saved_variables` ( - `NextArenaPointDistributionTime` bigint(40) UNSIGNED NOT NULL DEFAULT '0' -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Variable Saves'; +CREATE TABLE `worldstates` ( + `entry` mediumint(11) UNSIGNED NOT NULL DEFAULT '0', + `value` bigint(40) UNSIGNED NOT NULL DEFAULT '0', + `comment` text NOT NULL, + PRIMARY KEY (`entry`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Variable Saves'; /*!40101 SET character_set_client = @saved_cs_client */; -- --- Dumping data for table `saved_variables` +-- Dumping data for table `worldstates` -- -LOCK TABLES `saved_variables` WRITE; -/*!40000 ALTER TABLE `saved_variables` DISABLE KEYS */; -/*!40000 ALTER TABLE `saved_variables` ENABLE KEYS */; +LOCK TABLES `worldstates` WRITE; +/*!40000 ALTER TABLE `worldstates` DISABLE KEYS */; +/*!40000 ALTER TABLE `worldstates` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/sql/updates/7705_characters_worldstates.sql b/sql/updates/7705_characters_worldstates.sql new file mode 100644 index 00000000000..7c43bc06617 --- /dev/null +++ b/sql/updates/7705_characters_worldstates.sql @@ -0,0 +1,9 @@ +ALTER TABLE `saved_variables` CHANGE `NextArenaPointDistributionTime` `value` bigint(40) UNSIGNED NOT NULL DEFAULT '0', +ADD COLUMN `entry` mediumint(11) UNSIGNED NOT NULL DEFAULT '0' FIRST, +ADD COLUMN `comment` text NOT NULL, +ADD PRIMARY KEY (`entry`), +RENAME `worldstates`, +ROW_FORMAT=DYNAMIC; + +-- Only posible value is NextArenaPointDistributionTime so make the conversion to custom worldstate +UPDATE `worldstates` SET `entry`=20001, `comment`='NextArenaPointDistributionTime';
\ No newline at end of file |
