Skip to content

Commit

Permalink
Add check to migration (#17186)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolajlauridsen authored Oct 4, 2024
1 parent 537a657 commit aa6bf56
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -11,5 +12,10 @@ public AddDocumentUrl(IMigrationContext context)
}

protected override void Migrate()
=> Create.Table<DocumentUrlDto>().Do();
{
if (TableExists(Constants.DatabaseSchema.Tables.DocumentUrl) is false)
{
Create.Table<DocumentUrlDto>().Do();
}
}
}

0 comments on commit aa6bf56

Please sign in to comment.