From 4028b7979e3b342baffdf1a9a36bde3e7f7746ff Mon Sep 17 00:00:00 2001 From: Eike Kettner Date: Wed, 17 Jun 2020 21:50:52 +0200 Subject: [PATCH] Fix mariadb timestamp columns MariaDB automatically inserts the current time, even when saying `SET datecol = null`. --- .../mariadb/V1.6.1__fix_timestamp_columns.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 modules/store/src/main/resources/db/migration/mariadb/V1.6.1__fix_timestamp_columns.sql diff --git a/modules/store/src/main/resources/db/migration/mariadb/V1.6.1__fix_timestamp_columns.sql b/modules/store/src/main/resources/db/migration/mariadb/V1.6.1__fix_timestamp_columns.sql new file mode 100644 index 00000000..0dcfb355 --- /dev/null +++ b/modules/store/src/main/resources/db/migration/mariadb/V1.6.1__fix_timestamp_columns.sql @@ -0,0 +1,14 @@ +ALTER TABLE `item` +MODIFY `itemdate` TIMESTAMP NULL; + +ALTER TABLE `item` +MODIFY `duedate` TIMESTAMP NULL; + +ALTER TABLE `user_` +MODIFY `lastlogin` TIMESTAMP NULL; + +ALTER TABLE `job` +MODIFY `started` TIMESTAMP NULL; + +ALTER TABLE `job` +MODIFY `finished` TIMESTAMP NULL;