Does the TeamCity plugin ignore /Exclude:table?
isme
Posts: 119
Hey RG,
I'm trying to package my database structure without tables.
I set the /Exclude:tables option in the Red Gate build step.
When TeamCity validates the database creation script, the build log shows that tables are still created.
Indeed, the CreationScript.sql in the NuGet package contains a bunch of CREATE TABLE statements.
The option works on my workstation, so why not in TeamCity?
Am I missing something?
Thanks!
I'm trying to package my database structure without tables.
I set the /Exclude:tables option in the Red Gate build step.
When TeamCity validates the database creation script, the build log shows that tables are still created.
[19:10:42]Creating [Customer].[tbCustomer] [19:10:42]Creating primary key [PK_tbCustomer] on [Customer].[tbCustomer] [19:10:42]Creating [Customer].[tbCustomerPermission] [19:10:42]Creating primary key [PK_tbCustomerPermission] on [Customer].[tbCustomerPermission] [...]
Indeed, the CreationScript.sql in the NuGet package contains a bunch of CREATE TABLE statements.
PRINT N'Creating [Customer].[tbCustomer]' GO CREATE TABLE [Customer].[tbCustomer] (...) GO [...] PRINT N'Creating primary key [PK_tbCustomer] on [Customer].[tbCustomer]' GO ALTER TABLE [Customer].[tbCustomer] ADD CONSTRAINT [PK_tbCustomer] PRIMARY KEY ... GO
The option works on my workstation, so why not in TeamCity?
Am I missing something?
Thanks!
Iain Elder, Skyscanner
Comments
You'll see no tables are mentioned... but then when we verify:
It does seem to be creating a table... also worth mentioning that the final package pushed through to Deployment Manager contains tables too.
I'll see if I can fathom it out.
Redgate Software
Jonthan Hickford explained that the compare options field is currently ignored in the packaging step.
He documented a workaround on the deployment manager website in an article called Customer Specific Database Deployments.
We followed his example. Our workaround is to filter objects before the 'Red Gate' step in a PowerShell step that invokes sqlcompate.exe with a scpf filter.
Would you be able to confirm whether the 'additional switches' functionailty will be fully implemented?
Thanks for investigating.
Redgate Software