From bce662b6da62409b745ca5077cd0c3213dfb6b59 Mon Sep 17 00:00:00 2001 From: Jacob Laursen Date: Tue, 2 Apr 2024 23:42:49 +0200 Subject: [PATCH] Provide better MySQL datatype for DateTimeType (#16604) Resolves #15697 Signed-off-by: Jacob Laursen Signed-off-by: Ciprian Pascu --- .../org/openhab/persistence/jdbc/internal/db/JdbcMysqlDAO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.persistence.jdbc/src/main/java/org/openhab/persistence/jdbc/internal/db/JdbcMysqlDAO.java b/bundles/org.openhab.persistence.jdbc/src/main/java/org/openhab/persistence/jdbc/internal/db/JdbcMysqlDAO.java index 6db8d56faaa..43b9b447274 100644 --- a/bundles/org.openhab.persistence.jdbc/src/main/java/org/openhab/persistence/jdbc/internal/db/JdbcMysqlDAO.java +++ b/bundles/org.openhab.persistence.jdbc/src/main/java/org/openhab/persistence/jdbc/internal/db/JdbcMysqlDAO.java @@ -90,7 +90,7 @@ public class JdbcMysqlDAO extends JdbcBaseDAO { this.dbMeta = dbMeta; // Initialize sqlTypes, depending on DB version for example if (dbMeta.isDbVersionGreater(5, 5)) { - sqlTypes.put("DATETIMEITEM", "TIMESTAMP(3)"); + sqlTypes.put("DATETIMEITEM", "DATETIME(3)"); sqlTypes.put("tablePrimaryKey", "TIMESTAMP(3)"); sqlTypes.put("tablePrimaryValue", "NOW(3)"); }