Skip to content

Commit 9a178cf

Browse files
authored
Provide better MySQL datatype for DateTimeType (openhab#16604)
Resolves openhab#15697 Signed-off-by: Jacob Laursen <[email protected]>
1 parent 79739c6 commit 9a178cf

File tree

1 file changed

+1
-1
lines changed
  • bundles/org.openhab.persistence.jdbc/src/main/java/org/openhab/persistence/jdbc/internal/db

1 file changed

+1
-1
lines changed

bundles/org.openhab.persistence.jdbc/src/main/java/org/openhab/persistence/jdbc/internal/db/JdbcMysqlDAO.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public void initAfterFirstDbConnection() {
9090
this.dbMeta = dbMeta;
9191
// Initialize sqlTypes, depending on DB version for example
9292
if (dbMeta.isDbVersionGreater(5, 5)) {
93-
sqlTypes.put("DATETIMEITEM", "TIMESTAMP(3)");
93+
sqlTypes.put("DATETIMEITEM", "DATETIME(3)");
9494
sqlTypes.put("tablePrimaryKey", "TIMESTAMP(3)");
9595
sqlTypes.put("tablePrimaryValue", "NOW(3)");
9696
}

0 commit comments

Comments
 (0)