Hi, I have defined a table model with default values but getTableSql() doesn't emit default values constraints, it was doing in older version. Any help appreciated. Table definition: ErrorLogDate column has default value as getDate()
<Table Name="MigrationErrorLog" SchemaName="stg.logging">
<Columns>
<Column Name="ErrorLogId" IdentityIncrement="1" DataType="Int64" IsNullable="false" />
<Column Name="ErrorLogDate" DataType="DateTime" IsNullable="false" Default="getDate()" />
<Column Name="PackageName" DataType="String" Length="100" IsNullable="true" />
<Column Name="PackageStep" DataType="String" Length="100" IsNullable="true" />
<Column Name="RecordTableName" DataType="String" Length="50" IsNullable="true" />
<Column Name="RecordSourceId" DataType="Int64" IsNullable="true"/>
<Column Name="ErrorCode" DataType="Int64" IsNullable="true" />
<Column Name="ErrorDescription" DataType="String" Length="4000" IsNullable="true" />
<Column Name="ErrorColumn" DataType="Int64" IsNullable="true" />
<Column Name="ErrorColumnName" DataType="String" Length="500" IsNullable="true" />
</Columns>
Emitted SQL :
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON GO ------------------------------------------------------------------- IF EXISTS (SELECT * from sys.objects WHERE object_id = OBJECT_ID(N'[MigrationErrorLog]') AND type IN (N'U')) DROP TABLE [MigrationErrorLog] GO CREATE TABLE [MigrationErrorLog] ( -- Columns Definition [ErrorLogId] bigint IDENTITY(1,1) NOT NULL , [ErrorLogDate] datetime NOT NULL , [PackageName] nvarchar(100) , [PackageStep] nvarchar(100) , [RecordTableName] nvarchar(50) , [RecordSourceId] bigint , [ErrorCode] bigint , [ErrorDescription] nvarchar(4000) , [ErrorColumn] bigint , [ErrorColumnName] nvarchar(500) -- Constraints ) ON "default" WITH (DATA_COMPRESSION = NONE) GO -------------------------------------------------------------------