From dd767f887e6b58df594ab5b4072842bf7030b053 Mon Sep 17 00:00:00 2001 From: Thomas Mahlberg Date: Thu, 17 Oct 2024 16:13:04 +0200 Subject: [PATCH] Restore RVA compatibility --- KustoSchemaTools/Model/Table.cs | 4 +++- KustoSchemaTools/Parser/DatabaseCleanup.cs | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/KustoSchemaTools/Model/Table.cs b/KustoSchemaTools/Model/Table.cs index 5a33513..fbd6cf2 100644 --- a/KustoSchemaTools/Model/Table.cs +++ b/KustoSchemaTools/Model/Table.cs @@ -20,7 +20,9 @@ public class Table : IKustoBaseEntity public string DocString { get; set; } [Obsolete("Use policies instead")] public string? RowLevelSecurity { get; set; } - + [Obsolete("Use policies instead")] + public bool RestrictedViewAccess { get; set; } = false; + public List CreateScripts(string name, bool isNew) { var scripts = new List(); diff --git a/KustoSchemaTools/Parser/DatabaseCleanup.cs b/KustoSchemaTools/Parser/DatabaseCleanup.cs index 0cf9e6f..ef91308 100644 --- a/KustoSchemaTools/Parser/DatabaseCleanup.cs +++ b/KustoSchemaTools/Parser/DatabaseCleanup.cs @@ -72,6 +72,8 @@ public void CleanUp(Database database) policy.RowLevelSecurity = entity.Value.RowLevelSecurity; } + policy.RestrictedViewAccess |= entity.Value.RestrictedViewAccess; + if (policy.Retention == database.DefaultRetentionAndCache.Retention) { policy.Retention = null; @@ -110,6 +112,7 @@ public void CleanUp(Database database) policy.RowLevelSecurity = entity.Value.RowLevelSecurity; } + if (policy.Retention == database.DefaultRetentionAndCache.Retention) { policy.Retention = null;