BimlExpress 2018 doesn't emit Default Value contraints

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 -------------------------------------------------------------------
0

Comments

2 comments
  • Is there any new information on this bug/issue? I am seeing the same behavior when I am using the GetDatabaseSchema method as well. I am using the latest version of BimlStudio 2018 (Build 5.0.633.17.0)
    0
    Comment actions Permalink
  • Thank you for bringing this to our attention. It is a known issue that has been fixed for the upcoming release that is due out by the end of August. We will be sure to invite you to the public preview as soon as it is available.
    0
    Comment actions Permalink

Please sign in to leave a comment.