Skip to content

Commit

Permalink
MySQL数据库中使用DATETIME(3)来代替TIMESTAMP, timestamp无法保存超过2038年的时间
Browse files Browse the repository at this point in the history
  • Loading branch information
entropy-cloud committed Jan 18, 2025
1 parent 856e49d commit 04a73dd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
<sqlDataType name="DATE" stdSqlType="DATE"/>
<sqlDataType name="TIME" stdSqlType="TIME"/>
<sqlDataType name="DATETIME" stdSqlType="DATETIME"/>
<sqlDataType name="TIMESTAMP" code="TIMESTAMP(3)" stdSqlType="TIMESTAMP"/>
<sqlDataType name="TIMESTAMP" code="DATETIME(3)" stdSqlType="TIMESTAMP"/>
<sqlDataType name="REAL" stdSqlType="REAL" alias="FLOAT"/>
<sqlDataType name="DOUBLE" stdSqlType="DOUBLE" alias="DOUBLE PRECISION"/>
<sqlDataType name="DECIMAL" stdSqlType="DECIMAL"/>
Expand All @@ -175,7 +175,7 @@
<sqlDataType name="JSON" stdSqlType="JSON" />
<sqlDataType name="SET" stdSqlType="ARRAY" deprecated="true"/>
<sqlDataType name="BINARY" stdSqlType="VARBINARY" />
<sqlDataType name="TIMESTAMP(6) WITH TIME ZONE" stdSqlType="TIMESTAMP" alias="TIMESTAMP WITH TIME ZONE"/>
<sqlDataType name="TIMESTAMP(6) WITH TIME ZONE" code="DATETIME(6)" stdSqlType="TIMESTAMP" alias="TIMESTAMP WITH TIME ZONE"/>
</sqlDataTypes>

</dialect>

0 comments on commit 04a73dd

Please sign in to comment.