View Issue Details

IDProjectCategoryView StatusLast Update
0002247SymmetricDSBugpublic2024-04-25 12:43
Reporternatarajan Assigned To 
Priorityurgent 
Status newResolutionopen 
Product Version3.7.11 
Summary0002247: dbexport oracle date type with "default sysdate" not compatible with other databases
DescriptionIn mysql we don't have default sysdate and date should be converted to datetime.

Please let us know if you have solution for this one?

Oracle

CREATE TABLE CTT1.TTT_USER_METRICS_HISTORY
(
  USER_ID NUMBER,
  TRANSACTION_ID VARCHAR2(100 BYTE),
  TRANSACTION_COUNT NUMBER,
  LST_UPTD_DTTM DATE DEFAULT SYSDATE NOT NULL
)

MYSQL
CREATE TABLE `TTT_USER_METRICS_HISTORY`(
    `USER_ID` DECIMAL,
    `TRANSACTION_ID` VARCHAR(100) NULL,
    `TRANSACTION_COUNT` DECIMAL,
    `LST_UPTD_DTTM` DATE DEFAULT SYSDATE NOT NULL
)
Tagsddl/schema

Activities

emiller

2024-04-24 18:03

developer   ~0002433

Is this fixed by issue 0005551?

elong

2024-04-25 12:43

developer   ~0002434

Oracle DATE can also store time, and it was common to do that, so it should map to DATETIME on other platforms like MySQL.

While 0005551 might help to map the "DEFAULT SYSDATE" to "DEFAULT CURRENT_TIMESTAMP", it would be better if it were automatic. The genericizeDefaultValuesAndUpdatePlatformColumn() method in AbstractJdbcDdlReader was meant for translation of platform specific defaults. So "DEFAULT SYSDATE" could be the default for the "platform-column" element for Oracle, while "DEFAULT CURRENT_TIMESTAMP" could be the default for the "column" element for cross-platform.

Issue History

Date Modified Username Field Change
2015-03-31 18:25 natarajan New Issue
2019-04-23 16:58 elong Tag Attached: ddl/schema
2019-05-13 20:20 elong Summary dbexport oracle to mysql date datatype => dbexport oracle date type with "default sysdate" not compatible with other databases
2024-04-24 18:03 emiller Note Added: 0002433
2024-04-25 12:43 elong Note Added: 0002434