Skip to content

Conversation

@Kundan-CR7
Copy link

@Kundan-CR7 Kundan-CR7 commented Nov 15, 2025

Fix: Correct Oracle SQL Export Type Mapping & Sized-Type Handling

Fixes #698

Summary

This PR fixes incorrect Oracle SQL export behavior in DrawDB by introducing proper Oracle datatype mapping and ensuring valid SQL generation. Several MySQL/Postgres datatypes were exported directly, causing Oracle syntax errors. This update aligns all supported types with Oracle standards and improves reliability of the Oracle export feature.


What Was Fixed

✔ Correct Oracle Type Mapping

  • INT, SMALLINT, BIGINTNUMBER
  • VARCHARVARCHAR2
  • TEXTCLOB
  • DOUBLEBINARY_DOUBLE
  • ENUM → handled gracefully (Oracle doesn't support ENUM)

✔ Improved exportSQL/oracleSql.js

  • Uses dbToTypes[DB.ORACLESQL] to resolve correct Oracle types
  • Adds sized types only when supported (e.g., VARCHAR2(255))
  • Fixes Oracle identity columns:
    GENERATED ALWAYS AS IDENTITY

@vercel
Copy link

vercel bot commented Nov 15, 2025

@Kundan-CR7 is attempting to deploy a commit to the dottle's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Kundan-CR7
Copy link
Author

@1ilit please review this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Oracle SQL Export Generates Incorrect / Incomplete SQL (Beta Feature Bug)

1 participant