Quite a lot of small, lovely improvements. Thanks.
I do not know if this is the expected result.
... or something is wrongly configured.
On northwind (already created ddbb & llblgen project)
1.
UC_{$TableName}_{$FieldNames}
Result (Create script)
-- Should be [UC_Shippers_CompanyName] ??
ALTER TABLE [dbo].[Shippers]
ADD CONSTRAINT [UC_6647bca44879f2219c739e6c220] UNIQUE NONCLUSTERED
(
[CompanyName]
)
GO
ALTER TABLE [dbo].[Suppliers]
ADD CONSTRAINT [UC_d6cdae143d19d349c0d381ad7b6] UNIQUE NONCLUSTERED
(
[CompanyName], [ContactName]
)
GO
2.
FK_{$TableName}_{$PkTableName}
Result (Create script):
-- Should be [FK_CustomerCustomerDemo_CustomerDemographics]
ALTER TABLE [dbo].[CustomerCustomerDemo]
ADD CONSTRAINT [FK_CustomerCustomerDemo] FOREIGN KEY
(
[CustomerTypeID]
)
REFERENCES [dbo].[CustomerDemographics]
(
[CustomerTypeID]
)
ON DELETE NO ACTION
ON UPDATE NO ACTION
GO
-- OK
ALTER TABLE [dbo].[CustomerCustomerDemo]
ADD CONSTRAINT [FK_CustomerCustomerDemo_Customers] FOREIGN KEY
(
[CustomerID]
)
REFERENCES [dbo].[Customers]
(
[CustomerID]
)
ON DELETE NO ACTION
ON UPDATE NO ACTION
GO
Best regards