Files
Umbraco-CMS/src/Umbraco.Cms.Persistence.EFCore.SqlServer/SqlServerMigrationProviderSetup.cs
Bjarke Berg 2973f9fe5a Add OpenIddict tables to database (#14449)
* Added migrations to install EF Core OpenIddict tables

* Handle Install of ef core data (Needs to be outside of transaction

* Cleanup and renaming, as these things will be reused for more than openiddict in the future

* Cleanup

* Extract db context setup

* Minor cleanup

---------

Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
2023-06-26 13:50:57 +02:00

15 lines
475 B
C#

using Microsoft.EntityFrameworkCore;
using Umbraco.Cms.Persistence.EFCore.Migrations;
namespace Umbraco.Cms.Persistence.EFCore.SqlServer;
public class SqlServerMigrationProviderSetup : IMigrationProviderSetup
{
public string ProviderName => "Microsoft.Data.SqlClient";
public void Setup(DbContextOptionsBuilder builder, string? connectionString)
{
builder.UseSqlServer(connectionString, x => x.MigrationsAssembly(GetType().Assembly.FullName));
}
}