From aa6bf5606cb55127745ca622986423ef8c02d93d Mon Sep 17 00:00:00 2001 From: Mole Date: Fri, 4 Oct 2024 09:34:14 +0200 Subject: [PATCH] Add check to migration (#17186) --- .../Migrations/Upgrade/V_15_0_0/AddDocumentUrl.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_15_0_0/AddDocumentUrl.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_15_0_0/AddDocumentUrl.cs index d1b70f034e..0fc6c3ba11 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_15_0_0/AddDocumentUrl.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_15_0_0/AddDocumentUrl.cs @@ -1,4 +1,5 @@ -using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Core; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_15_0_0; @@ -11,5 +12,10 @@ public class AddDocumentUrl : MigrationBase } protected override void Migrate() - => Create.Table().Do(); + { + if (TableExists(Constants.DatabaseSchema.Tables.DocumentUrl) is false) + { + Create.Table().Do(); + } + } }