diff options
| author | joschiwald <joschiwald.trinity@gmail.com> | 2018-01-02 20:53:59 +0100 |
|---|---|---|
| committer | joschiwald <joschiwald.trinity@gmail.com> | 2018-01-03 15:14:49 +0100 |
| commit | 425b181544a21d2246fdf0261ba76a37e2510883 (patch) | |
| tree | 3c79e693b6da1ba3d6241d8a0235a8f5f103484b /sql/updates/world | |
| parent | 4e9d34691997b7dded45c7857b67413af7ff7c6f (diff) | |
DB: Made timestamp columns, those can have no date, nullable instead of saving invalid date '0000-00-00 00:00:00'
* This makes our tables mysql strict mode conform
Ref #21113
(cherry picked from commit c2aead1da5b6cb9a3a69e276b3f12a2c76b9ab86)
Diffstat (limited to 'sql/updates/world')
| -rw-r--r-- | sql/updates/world/3.3.5/2018_01_03_00_world_2018_01_02_00_world.sql | 11 |
1 files changed, 11 insertions, 0 deletions
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; |
