db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r279060 - in /db/ddlutils/trunk/src: java/org/apache/ddlutils/platform/MySqlPlatform.java test/org/apache/ddlutils/builder/TestMySqlPlatform.java
Date Tue, 06 Sep 2005 18:44:00 GMT
Author: tomdz
Date: Tue Sep  6 11:43:52 2005
New Revision: 279060

URL: http://svn.apache.org/viewcvs?rev=279060&view=rev
Log:
Improvement as specified in DDLUTILS-10

Modified:
    db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/MySqlPlatform.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMySqlPlatform.java

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/MySqlPlatform.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/MySqlPlatform.java?rev=279060&r1=279059&r2=279060&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/MySqlPlatform.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/MySqlPlatform.java Tue Sep  6
11:43:52 2005
@@ -68,6 +68,10 @@
         info.addNativeTypeMapping(Types.REAL,          "FLOAT");
         info.addNativeTypeMapping(Types.REF,           "MEDIUMBLOB");
         info.addNativeTypeMapping(Types.STRUCT,        "LONGBLOB");
+        // Since TIMESTAMP is not a stable datatype yet, and does not support a higher precision
+        // that DATETIME (year to seconds) as of MySQL 5, we map the JDBC type here to DATETIME
+        // TODO: Make this configurable
+        info.addNativeTypeMapping(Types.TIMESTAMP,     "DATETIME");
         info.addNativeTypeMapping(Types.VARBINARY,     "VARCHAR");
         info.addNativeTypeMapping("BOOLEAN",  "TINYINT(1)");
         info.addNativeTypeMapping("DATALINK", "MEDIUMBLOB");

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMySqlPlatform.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMySqlPlatform.java?rev=279060&r1=279059&r2=279060&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMySqlPlatform.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/builder/TestMySqlPlatform.java Tue Sep
 6 11:43:52 2005
@@ -71,7 +71,7 @@
             "    COL_SMALLINT        SMALLINT,\n"+
             "    COL_STRUCT          LONGBLOB,\n"+
             "    COL_TIME            TIME,\n"+
-            "    COL_TIMESTAMP       TIMESTAMP,\n"+
+            "    COL_TIMESTAMP       DATETIME,\n"+
             "    COL_TINYINT         TINYINT,\n"+
             "    COL_VARBINARY       VARCHAR(15) BINARY,\n"+
             "    COL_VARCHAR         VARCHAR(15)\n"+



Mime
View raw message