Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetDropAndCreateDdl() doesn't generate Default Contraints #64

Open
DavidSteinJr opened this issue Jul 23, 2018 · 0 comments
Open

GetDropAndCreateDdl() doesn't generate Default Contraints #64

DavidSteinJr opened this issue Jul 23, 2018 · 0 comments
Labels

Comments

@DavidSteinJr
Copy link

DavidSteinJr commented Jul 23, 2018

The following sample table has two columns, each of which has a default value specified:

<Biml xmlns="http://schemas.varigence.com/biml.xsd">
    <Tables>
        <Table Name="DefaultTest" SchemaName="MyDatabase.shred" PackageSubpath="ZTrash" >
			<Columns>
				<Column Name="EtlPackageInstanceRunID" DataType="Int32"  Default="1" IsNullable="false"/>
				<Column Name="RecordID" DataType="Int64"  Default="(NEXT VALUE FOR [Staging_Sequence])" IsNullable="false"/>
            </Columns>
		</Table>	
    </Tables>
</Biml>

The following is generated using GetDropAndCreateDdl():

SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO

-------------------------------------------------------------------
IF EXISTS (SELECT * from sys.objects WHERE object_id = OBJECT_ID(N'[shred].[DefaultTest]') AND type IN (N'U'))
DROP TABLE [shred].[DefaultTest]
GO

CREATE TABLE [shred].[DefaultTest]
(
-- Columns Definition
	[EtlPackageInstanceRunID] int NOT NULL 
,	[RecordID] bigint NOT NULL 

-- Constraints

)
ON "default"
WITH (DATA_COMPRESSION = NONE)
GO

-------------------------------------------------------------------

Obviously, there are no Default Constraints generated.

@varigence varigence added this to the BimlSuite 2018.2 milestone Aug 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant