aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/base/auth_database.sql5
-rw-r--r--sql/updates/auth/3.3.5/2018_01_03_00_auth_2018_01_02_00_auth.sql9
-rw-r--r--sql/updates/world/3.3.5/2018_01_03_00_world_2018_01_02_00_world.sql11
3 files changed, 23 insertions, 2 deletions
diff --git a/sql/base/auth_database.sql b/sql/base/auth_database.sql
index 5ea1ff182fa..7273a4c0147 100644
--- a/sql/base/auth_database.sql
+++ b/sql/base/auth_database.sql
@@ -38,7 +38,7 @@ CREATE TABLE `account` (
`failed_logins` int(10) unsigned NOT NULL DEFAULT '0',
`locked` tinyint(3) unsigned NOT NULL DEFAULT '0',
`lock_country` varchar(2) NOT NULL DEFAULT '00',
- `last_login` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `last_login` timestamp NULL,
`online` tinyint(3) unsigned NOT NULL DEFAULT '0',
`expansion` tinyint(3) unsigned NOT NULL DEFAULT '2',
`mutetime` bigint(20) NOT NULL DEFAULT '0',
@@ -1824,7 +1824,8 @@ INSERT INTO `updates` VALUES
('2017_08_01_00_auth.sql','6ECE808AF52345177189E962C0606B769B6806A6','RELEASED','2017-08-01 01:11:28',0),
('2017_10_13_00_auth.sql','87674E0D166AC60E3725B445714427892E42C6FE','RELEASED','2017-10-13 22:00:22',0),
('2017_10_29_00_auth.sql','0AF3E442B2F312D4F396EC07517B156EF2BFF0F4','RELEASED','2017-10-08 12:30:47',16),
-('2017_12_17_00_auth.sql','2CD99730D4D32DBF0584CD5B1AA6F8F4AE3DA975','RELEASED','2017-12-17 03:17:39',52);
+('2017_12_17_00_auth.sql','2CD99730D4D32DBF0584CD5B1AA6F8F4AE3DA975','RELEASED','2017-12-17 03:17:39',52),
+('2018_01_03_00_auth_2018_01_02_00_auth.sql','08AF5DAB45515B681B738DA17FA414C7C7CCA44E','RELEASED','2018-01-02 20:40:37',0);
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
UNLOCK TABLES;
diff --git a/sql/updates/auth/3.3.5/2018_01_03_00_auth_2018_01_02_00_auth.sql b/sql/updates/auth/3.3.5/2018_01_03_00_auth_2018_01_02_00_auth.sql
new file mode 100644
index 00000000000..85c15272c51
--- /dev/null
+++ b/sql/updates/auth/3.3.5/2018_01_03_00_auth_2018_01_02_00_auth.sql
@@ -0,0 +1,9 @@
+SET @sql_mode = @@session.sql_mode;
+SET SESSION sql_mode = '';
+
+ALTER TABLE `account`
+ CHANGE `last_login` `last_login` TIMESTAMP NULL;
+
+UPDATE `account` SET `last_login`=NULL WHERE `last_login`='0000-00-00 00:00:00';
+
+SET SESSION sql_mode = @@sql_mode;
diff --git a/sql/updates/world/3.3.5/2018_01_03_00_world_2018_01_02_00_world.sql b/sql/updates/world/3.3.5/2018_01_03_00_world_2018_01_02_00_world.sql
new file mode 100644
index 00000000000..d15d303ca78
--- /dev/null
+++ b/sql/updates/world/3.3.5/2018_01_03_00_world_2018_01_02_00_world.sql
@@ -0,0 +1,11 @@
+SET @sql_mode = @@session.sql_mode;
+SET SESSION sql_mode = '';
+
+ALTER TABLE `game_event`
+ CHANGE `start_time` `start_time` TIMESTAMP NULL COMMENT 'Absolute start date, the event will never start before',
+ CHANGE `end_time` `end_time` TIMESTAMP NULL COMMENT 'Absolute end date, the event will never start after';
+
+UPDATE `game_event` SET `start_time`=NULL WHERE `start_time`='0000-00-00 00:00:00';
+UPDATE `game_event` SET `end_time`=NULL WHERE `end_time`='0000-00-00 00:00:00';
+
+SET SESSION sql_mode = @@sql_mode;