View Issue Details

IDProjectCategoryView StatusLast Update
0002247SymmetricDSBugpublic2025-08-07 15:49
Reporternatarajan Assigned Toemiller  
Priorityurgent 
Status closedResolutionfixed 
Product Version3.7.11 
Target Version3.16.5Fixed in Version3.16.5 
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

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.

pbelov

2025-08-07 15:49

manager   ~0003302

Included in the 3.16.5 release

Related Changesets

SymmetricDS: 3.16 1a96fd61

2025-07-21 11:55:37

evan-miller-jumpmind


Committer: GitHub Details Diff
0002247: Mapped Oracle DEFAULT SYSDATE to DEFAULT CURRENT_TIMESTAMP for cross-platform (#325) Affected Issues
0002247
mod - symmetric-jdbc/src/main/java/org/jumpmind/db/platform/oracle/OracleDdlReader.java Diff File

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-25 12:43 elong Note Added: 0002434
2025-04-16 17:37 pmarzullo Status new => confirmed
2025-07-14 13:13 emiller Assigned To => emiller
2025-07-14 13:13 emiller Status confirmed => assigned
2025-07-14 13:14 emiller Target Version => 3.16.5
2025-07-21 11:56 pbelov Status assigned => resolved
2025-07-21 11:56 pbelov Resolution open => fixed
2025-07-21 11:56 pbelov Fixed in Version => 3.16.5
2025-07-21 12:00 Changeset attached => SymmetricDS 3.16 1a96fd61
2025-08-07 15:49 pbelov Note Added: 0003302
2025-08-07 15:49 pbelov Status resolved => closed