AdaptDDLshould preserve source NOT NULL column definitions and not automatically create datatype based DEFAULT constraints on its own judgement
AnsweredWhen AdaptDDL creates a new table on a Microsoft SQL Server & Snowflake target from a Sybase source, HVR automatically adds DEFAULT constraints to NOT NULL columns when no explicit default exists on the source table alongside this when a default is specified it's not accurately added to the target.
Current behaviour:
- Source table contains NOT NULL columns without user-defined defaults.
- AdaptDDL creates the table on SQL Server.
- HVR automatically adds defaults based on datatype:
- Character columns → default
' ' - Numeric columns → default
0
- Character columns → default
- Target schema therefore differs from the source schema.
Issue:
- The generated target DDL is not an accurate representation of the source DDL.
- Additional default constraints can affect application behaviour, data quality controls, and downstream schema comparisons.
- Customers may require schema parity between source and target environments.
Requested enhancement:
- Provide an AdaptDDL option to preserve source column definitions exactly.
- Allow disabling automatic creation of datatype-based defaults on NOT NULL columns.
- Alternatively, only create DEFAULT constraints when an explicit default exists on the source table.
Expected behaviour: If a source column is defined as:
Business impact:
- Prevents schema drift between source and target.
- Simplifies DDL comparisons and governance.
- Avoids unintended data population through system-generated defaults.
- Better supports migrations where source DDL fidelity is required.
-
Hi Ali,
Thank you for this feature request. We understand DDL differences between source and target can lead to problems. We are looking at how to improve the HVR adapt functionality and will take this feature request into account for the project.
We will let you know when there is news on progress.
Best regards,
Edwin
Please sign in to leave a comment.
Comments
1 comment