Activity overview
Latest activity by AbeAxiomatic
Hi, Dan Thanks for the quick response! I'm currently using SQL Source Control (not Change Automation) Version 7.2.4.11418. I'll paste my CREATE scripts below for context. The scenario where this comes up is in getting a new employee set up with a blank database, and using Source Control to deploy all database objects and static data. PRINT N'Creating types' GO CREATE TYPE [dbo].[CaseInvoices] AS TABLE ( [CaseNumber] [dbo].[DelinquentCaseNumber] NULL, [EntryDetail] [nvarchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [InvoiceAmount] [decimal] (18, 2) NULL ) GO @ERROR <> 0 SET NOEXEC ON GO CREATE TYPE [dbo].[DelinquentCaseNumber] FROM int NOT NULL GO @ERROR <> 0 SET NOEXEC ON GO CREATE TYPE [dbo].[CasePayments] AS TABLE ( [CaseNumber] [dbo].[DelinquentCaseNumber] NULL, [PaymentAmount] [decimal] (18, 2) NULL ) GO / comments
Hi, DanThanks for the quick response! I'm currently using SQL Source Control (not Change Automation) Version 7.2.4.11418. I'll paste my CREATE scripts below for context. The scenario where this com...
User Defined Types with dependencies
I'm looking for a way to control the order in which User Defined Types are executed on an initial deployment to a blank database for my developers. By default, they all seem to appear in alphabetic...
Thanks for the follow-up! I'll give this a try as soon as I get a chance. It should help me create a more useful data set for my developers / comments
Thanks for the follow-up! I'll give this a try as soon as I get a chance. It should help me create a more useful data set for my developers
I tried adding explicit unique constraints on both tables, and arrived at the same issue. Here are my abbreviated table definitions:
CREATE TABLE [dbo].[Entity] (
[EntityId] INT NOT NULL IDENTITY(1,1),
[EntityTypeId] TINYINT NOT NULL CONSTRAINT FK_Entity_EntityType REFERENCES ref.EntityType (EntityTypeId),
CONSTRAINT PK_Entity Primary Key (EntityId, EntityTypeId),
CONSTRAINT UC_Entity UNIQUE (EntityId)
); CREATE TABLE [entity].[Person] (
[EntityId] INT NOT NULL,
[EntityTypeId] AS CAST(10 AS TINYINT) PERSISTED NOT NULL,
[FirstName] NVARCHAR (50) NOT NULL,
[LastName] NVARCHAR (50) NOT NULL,
CONSTRAINT PK_Person PRIMARY KEY (EntityId, EntityTypeId),
CONSTRAINT FK_Person_Entity FOREIGN KEY (EntityId, EntityTypeId) REFERENCES dbo.Entity (EntityId, EntityTypeId),
CONSTRAINT UQ_PERSON UNIQUE (EntityId)
);
/ comments
I tried adding explicit unique constraints on both tables, and arrived at the same issue. Here are my abbreviated table definitions:
CREATE TABLE [dbo].[Entity] (
[EntityId] INT NOT NULL IDENTI...