From ba84916bb50a91e55e5191150d54d819c4a72f96 Mon Sep 17 00:00:00 2001 From: nikolajlauridsen Date: Fri, 4 Oct 2024 09:11:09 +0200 Subject: [PATCH] Add check to migration --- .../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 d1b70f034e7e..0fc6c3ba1143 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 AddDocumentUrl(IMigrationContext context) } protected override void Migrate() - => Create.Table().Do(); + { + if (TableExists(Constants.DatabaseSchema.Tables.DocumentUrl) is false) + { + Create.Table().Do(); + } + } }