- SqlPackage or DacFx Version: Both
- .NET Framework (Windows-only) or .NET Core: Both
- Environment (local platform and source/target platforms): All
Steps to Reproduce:
- Make sure table has retention period set (HISTORY_RETENTION_PERIOD=6 MONTH) and is previously deployed like that.
- Do any kind of change in the "Area" table, so publish script captures table changes (They did column reordering).
- Generate publish script and observe part of script where Area table is recreated. The retention period is missing in ALTER statement. Due to that, after script publish, Area table will no longer have retention period set.
- Same behavior when publishing from Visual Studio and Azure DevOps release pipeline (task “Azure SQL Database deployment”).
- Above described issue is causing table rebuilding for system versioned tables, because DB project table schema still have retention period set in the code.
Did this occur in prior versions? If not - which version(s) did it work in?
(DacFx/SqlPackage/SSMS/Azure Data Studio)