Adding option WITH (DROP_EXISTING = ON) will recreate the index.
DACPAC not detect a filegroup change
Tools and Env:
Azure DevOps for CI/CD; Git Repo to manage the code; Visual Studio for development; Azure SQL DB; Assuming we have 2 environments Dev and Test.
Original table DDL:
CREATE TABLE [edw].[table1] (
[id] INT NULL,
[description] VARCHAR (4000) NULL,
[Etl_Exp_Dttm] DATETIME2 (3) NULL
) ;
CREATE UNIQUE INDEX [indextable1] ON [edw].[table1]
(
[id] ASC
) ;
Changed in the Repo and did a test release as following:
CREATE TABLE [edw].[table1] (
[id] INT NULL,
[description] VARCHAR (4000) NULL,
[Etl_Exp_Dttm] DATETIME2 (3) NULL
) ON PS_Etl_Exp_Dttm ([Etl_Exp_Dttm]);
CREATE UNIQUE INDEX [indextable1] ON [edw].[table1]
(
[id] ASC
) ON PS_Etl_Exp_Dttm([Etl_Exp_Dttm]);
The partition function and partition scheme have been included in the repo as well.
DACPAC didn't recreate the index or table, as the table is still siting under primary filegroup in test db. Is there any way to partition the test via DACPAC without dropping and recreating the index separately?
Azure SQL Database
1 answer
Sort by: Most helpful
-
Victor Zhao 1 Reputation point
2023-01-11T23:14:06.0333333+00:00