summaryrefslogtreecommitdiff
path: root/sql-files
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2019-10-18 16:53:38 +0200
committerGitHub <noreply@github.com>2019-10-18 16:53:38 +0200
commit9fb69836caaa3bc46ad1109c3aa9df8ee60cc6fe (patch)
tree26c58b5cbadfe5731ef1902b50e1c095b8321a66 /sql-files
parent29b587ae936fc76828cb3982de8c43caaea5fe86 (diff)
parent9e5994866305ef23628020d1605fac43305c2105 (diff)
downloadhercules-9fb69836caaa3bc46ad1109c3aa9df8ee60cc6fe.tar.gz
hercules-9fb69836caaa3bc46ad1109c3aa9df8ee60cc6fe.tar.bz2
hercules-9fb69836caaa3bc46ad1109c3aa9df8ee60cc6fe.tar.xz
hercules-9fb69836caaa3bc46ad1109c3aa9df8ee60cc6fe.zip
Merge pull request #2551 from guilherme-gm/201910-fix-sc-times
Fixes status changes effect timer when relogging
Diffstat (limited to 'sql-files')
-rw-r--r--sql-files/main.sql2
-rw-r--r--sql-files/upgrades/2019-10-05--19-01.sql28
-rw-r--r--sql-files/upgrades/index.txt1
3 files changed, 31 insertions, 0 deletions
diff --git a/sql-files/main.sql b/sql-files/main.sql
index 27839afa3..4627799aa 100644
--- a/sql-files/main.sql
+++ b/sql-files/main.sql
@@ -685,6 +685,7 @@ CREATE TABLE IF NOT EXISTS `sc_data` (
`char_id` INT(11) UNSIGNED NOT NULL,
`type` SMALLINT(11) UNSIGNED NOT NULL,
`tick` INT(11) NOT NULL,
+ `total_tick` INT(11) NOT NULL,
`val1` INT(11) NOT NULL DEFAULT '0',
`val2` INT(11) NOT NULL DEFAULT '0',
`val3` INT(11) NOT NULL DEFAULT '0',
@@ -931,6 +932,7 @@ INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1554760320); -- 2019-04-0
INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1556147483); -- 2019-04-25--02-12.sql
INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1557414445); -- 2019-05-09--18-07.sql
INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1565293394); -- 2019-08-08--19-43.sql
+INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1570309293); -- 2019-10-05--19-01.sql
--
-- Table structure for table `storage`
diff --git a/sql-files/upgrades/2019-10-05--19-01.sql b/sql-files/upgrades/2019-10-05--19-01.sql
new file mode 100644
index 000000000..4cb7c1c51
--- /dev/null
+++ b/sql-files/upgrades/2019-10-05--19-01.sql
@@ -0,0 +1,28 @@
+#1570309293
+
+-- This file is part of Hercules.
+-- http://herc.ws - http://github.com/HerculesWS/Hercules
+--
+-- Copyright (C) 2019 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 <http://www.gnu.org/licenses/>.
+
+-- Adds new total_tick column
+ALTER TABLE `sc_data` ADD COLUMN `total_tick` INT(11) NOT NULL AFTER `tick`;
+
+-- Copy current tick to total_tick so players doesn't lose their current
+-- status_changes, although those will still appear wrong until they end
+UPDATE `sc_data` SET `total_tick` = `tick`;
+
+INSERT INTO `sql_updates` (`timestamp`) VALUES (1570309293);
diff --git a/sql-files/upgrades/index.txt b/sql-files/upgrades/index.txt
index 85bd2a245..10eb30762 100644
--- a/sql-files/upgrades/index.txt
+++ b/sql-files/upgrades/index.txt
@@ -56,3 +56,4 @@
2019-04-25--02-12.sql
2019-05-09--18-07.sql
2019-08-08--19-43.sql
+2019-10-05--19-01.sql