From 9b213d528bfc69f8f3433438e2dbbe367984c894 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 18 Mar 2024 10:29:31 +0100 Subject: [PATCH] `schmema/mysql/1.1.2`: Fix timestamp is not UNIX time We previously incorrectly used `CURRENT_TIMESTAMP()` instead of `UNIX_TIMESTAMP()` so the timestamps need to be corrected. --- schema/mysql/upgrades/1.1.2.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 schema/mysql/upgrades/1.1.2.sql diff --git a/schema/mysql/upgrades/1.1.2.sql b/schema/mysql/upgrades/1.1.2.sql new file mode 100644 index 000000000..9f5edd5fa --- /dev/null +++ b/schema/mysql/upgrades/1.1.2.sql @@ -0,0 +1 @@ +UPDATE icingadb_schema SET timestamp = UNIX_TIMESTAMP(timestamp / 1000) * 1000 WHERE timestamp > 20000000000000000;