From 82e2744a6df3f97d1236c06e7eca4d2a88ab6c0b Mon Sep 17 00:00:00 2001 From: Kenpachi Developer Date: Fri, 1 May 2020 04:55:01 +0200 Subject: Unify size of columns holding string variable values to 255 --- sql-files/main.sql | 7 ++++--- sql-files/upgrades/2020-05-01--04-44.sql | 25 +++++++++++++++++++++++++ sql-files/upgrades/index.txt | 1 + 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 sql-files/upgrades/2020-05-01--04-44.sql (limited to 'sql-files') diff --git a/sql-files/main.sql b/sql-files/main.sql index dcd7e543d..d5b7735fc 100644 --- a/sql-files/main.sql +++ b/sql-files/main.sql @@ -51,7 +51,7 @@ CREATE TABLE IF NOT EXISTS `acc_reg_str_db` ( `account_id` INT UNSIGNED NOT NULL DEFAULT '0', `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', `index` INT UNSIGNED NOT NULL DEFAULT '0', - `value` VARCHAR(254) NOT NULL DEFAULT '0', + `value` VARCHAR(255) NOT NULL DEFAULT '0', PRIMARY KEY (`account_id`,`key`,`index`), KEY `account_id` (`account_id`) ) ENGINE=MyISAM; @@ -275,7 +275,7 @@ CREATE TABLE IF NOT EXISTS `char_reg_str_db` ( `char_id` INT UNSIGNED NOT NULL DEFAULT '0', `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', `index` INT UNSIGNED NOT NULL DEFAULT '0', - `value` VARCHAR(254) NOT NULL DEFAULT '0', + `value` VARCHAR(255) NOT NULL DEFAULT '0', PRIMARY KEY (`char_id`,`key`,`index`), KEY `char_id` (`char_id`) ) ENGINE=MyISAM; @@ -372,7 +372,7 @@ CREATE TABLE IF NOT EXISTS `global_acc_reg_str_db` ( `account_id` INT UNSIGNED NOT NULL DEFAULT '0', `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', `index` INT UNSIGNED NOT NULL DEFAULT '0', - `value` VARCHAR(254) NOT NULL DEFAULT '0', + `value` VARCHAR(255) NOT NULL DEFAULT '0', PRIMARY KEY (`account_id`,`key`,`index`), KEY `account_id` (`account_id`) ) ENGINE=MyISAM; @@ -938,6 +938,7 @@ INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1574463539); -- 2019-11-2 INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1579817630); -- 2020-01-24--01-09.sql INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1584838560); -- 2020-03-22--01-56.sql INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1584842940); -- 2020-03-22--03-09.sql +INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1588301040); -- 2020-05-01--04-44.sql -- -- Table structure for table `storage` diff --git a/sql-files/upgrades/2020-05-01--04-44.sql b/sql-files/upgrades/2020-05-01--04-44.sql new file mode 100644 index 000000000..6cb5a30ec --- /dev/null +++ b/sql-files/upgrades/2020-05-01--04-44.sql @@ -0,0 +1,25 @@ +#1588301040 + +-- This file is part of Hercules. +-- http://herc.ws - http://github.com/HerculesWS/Hercules +-- +-- Copyright (C) 2019-2020 Hercules Dev Team +-- +-- Hercules is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . + +ALTER TABLE `acc_reg_str_db` MODIFY `value` VARCHAR(255) NOT NULL DEFAULT '0'; +ALTER TABLE `char_reg_str_db` MODIFY `value` VARCHAR(255) NOT NULL DEFAULT '0'; +ALTER TABLE `global_acc_reg_str_db` MODIFY `value` VARCHAR(255) NOT NULL DEFAULT '0'; + +INSERT INTO `sql_updates` (`timestamp`) VALUES (1588301040); diff --git a/sql-files/upgrades/index.txt b/sql-files/upgrades/index.txt index fdd5fcc5a..64a7793f8 100644 --- a/sql-files/upgrades/index.txt +++ b/sql-files/upgrades/index.txt @@ -62,3 +62,4 @@ 2020-01-24--01-09.sql 2020-03-22--01-56.sql 2020-03-22--03-09.sql +2020-05-01--04-44.sql -- cgit v1.2.3-60-g2f50