Default-constraints are not deleted properly

If you delete a field which has a default-constraint in Data-Modeler and export the resulting compare-script to SQLServer2017, you get an error from SQLServer. The constraint has to be dropped before you are allowed to drop the field. Field-constraints seem not to be handled properly in Data-Modeler.

Example:

  1. Imagine you created a table "tblTest" in Data-Modeler, so that the compare statement produces this script, which you execute in SQLServer:

CREATE TABLE [tblTest] (
[ID] INTEGER IDENTITY(0,1) NOT NULL,
[Name] NVARCHAR(50) NOT NULL
CONSTRAINT [DF_tblTest_Name] DEFAULT ('-'),
[Age] INTEGER NULL
CONSTRAINT [DF_tblTest_Age] DEFAULT ((0)),
CONSTRAINT [PK_tblTest] PRIMARY KEY ([ID])
)
GO

  1. Imagine farther you delete the field "Age". Data-Modeler generates the script:
ALTER TABLE [tblTest] DROP COLUMN [Age]
GO

but it should generate:

ALTER TABLE [tblTest] DROP CONSTRAINT [DF_tblTest_Age]
GO
ALTER TABLE [tblTest] DROP COLUMN [Age]
GO

Fixed in 3.3.5. This is actually a bug report, please report further bugs directly through us via e-mail.

This feature was implemented.