Is there any way to set the database option for Temporal History Retention to off in a Visual Studio SQL Server 2017 Database project?
When I generate a script from my publish profile it adds the code below and I'm unable to find a way to prevent it.
ALTER DATABASE [$(DatabaseName)]
SET TEMPORAL_HISTORY_RETENTION ON
WITH ROLLBACK IMMEDIATE;
I don't want to prevent it from setting all db options as I do use others. I only want to set this one to OFF so the script doesn't produce the output above.
I feel like i'm just missing a tick box somewhere?!?
Any help would be very much appreciated.
Edit the .sqlproj file and add either True or False for the TemporalHistoryRetentionEnabled param.
i.e.
<TemporalHistoryRetentionEnabled>True</TemporalHistoryRetentionEnabled>
Edit: it seems to be a bug when importing a database/dacpac the option is set to On/Off depending on whether or not you choose to import database settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With