From 7b3e9ad5dfa057caaba15812b73580050bfc70b9 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 25 Nov 2020 16:35:53 +0100 Subject: [PATCH] Respect no-deletion everywhere. --- .../Implementation/Sync/Schemas/SchemasSynchronizer.cs | 6 ++++++ cli/Squidex.CLI/Squidex.CLI/Squidex.CLI.csproj | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cli/Squidex.CLI/Squidex.CLI/Commands/Implementation/Sync/Schemas/SchemasSynchronizer.cs b/cli/Squidex.CLI/Squidex.CLI/Commands/Implementation/Sync/Schemas/SchemasSynchronizer.cs index 8339c4e9..1924bfa6 100644 --- a/cli/Squidex.CLI/Squidex.CLI/Commands/Implementation/Sync/Schemas/SchemasSynchronizer.cs +++ b/cli/Squidex.CLI/Squidex.CLI/Commands/Implementation/Sync/Schemas/SchemasSynchronizer.cs @@ -117,6 +117,12 @@ await log.DoSafeAsync($"Schema {newSchema.Name} creating", async () => var version = schemasByName[newSchema.Name].Version; + if (options.NoDeletion) + { + newSchema.Schema.NoFieldDeletion = true; + newSchema.Schema.NoFieldRecreation = true; + } + await log.DoVersionedAsync($"Schema {newSchema.Name} updating", version, async () => { var result = await session.Schemas.PutSchemaSyncAsync(session.App, newSchema.Name, newSchema.Schema); diff --git a/cli/Squidex.CLI/Squidex.CLI/Squidex.CLI.csproj b/cli/Squidex.CLI/Squidex.CLI/Squidex.CLI.csproj index 463c4405..56642859 100644 --- a/cli/Squidex.CLI/Squidex.CLI/Squidex.CLI.csproj +++ b/cli/Squidex.CLI/Squidex.CLI/Squidex.CLI.csproj @@ -14,7 +14,7 @@ netcoreapp3.1 true sq - 6.1 + 6.2