Versions 1.5.3 and 1.5.2 failed.
SQL SERVER 2019
VS 2022 64-bit LTSC 17.8
Steps to Reproduce:
- Create index in SSMS on SQL Server outside of Visual Studio SSDT Database project, e.g.:
CREATE INDEX idx_MyNewIndex
ON dbo.MYTESTTABLE(Field1, Field2);
-
Add new column to SSDT Database Project to SAME TABLE TO WHICH THE INDEX IS ON in VS. e.g. [MY_NEW_FIELD] NCHAR(10) NULL,
-
MS Build the Database project.
-
Deploy built DACPAC via the following command:
sqlpackage.exe /Action:Publish `
/SourceFile:".....\xxx.dacpac" `
/TargetConnectionString:"Data Source=xxxx;Integrated Security=True;Initial Catalog=xxx;TrustServerCertificate=True;" `
/p:AdditionalDeploymentContributors=AgileSqlClub.DeploymentFilterContributor `
/p:AdditionalDeploymentContributorPaths="xxx" `
/p:AdditionalDeploymentContributorArguments="SqlPackageFilter=IgnoreSchema(^((?!\bdbo\b).)*$)" `
/p:DropObjectsNotInSource=false `
/p:BlockOnPossibleDataLoss=false `
/p:IgnoreTableOptions=false `
/Diagnostics > "xxxx\sqlpackage_output.txt" 2>&1
-
EXPECTED RESULTS: 1) New column added and 2) Index not in project untouched and still there that is never dropped and recreated and never dropped at all or touched at all by DACPAC SQL.
-
ACTUAL RESULTS: 1) New column only created, 2) Index dropped.
Versions 1.5.3 and 1.5.2 failed.
SQL SERVER 2019
VS 2022 64-bit LTSC 17.8
Steps to Reproduce:
CREATE INDEX idx_MyNewIndex
ON dbo.MYTESTTABLE(Field1, Field2);
Add new column to SSDT Database Project to SAME TABLE TO WHICH THE INDEX IS ON in VS. e.g. [MY_NEW_FIELD] NCHAR(10) NULL,
MS Build the Database project.
Deploy built DACPAC via the following command:
sqlpackage.exe /Action:Publish `
EXPECTED RESULTS: 1) New column added and 2) Index not in project untouched and still there that is never dropped and recreated and never dropped at all or touched at all by DACPAC SQL.
ACTUAL RESULTS: 1) New column only created, 2) Index dropped.