fix #5916 - PostgreSQL failing to install on .NET 10
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
using EFCore.NamingConventions.Internal;
|
using EFCore.NamingConventions.Internal;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
@@ -109,6 +110,9 @@ namespace Oqtane.Database.PostgreSQL
|
|||||||
public override void UpdateIdentityStoreTableNames(ModelBuilder builder)
|
public override void UpdateIdentityStoreTableNames(ModelBuilder builder)
|
||||||
{
|
{
|
||||||
foreach (var entity in builder.Model.GetEntityTypes())
|
foreach (var entity in builder.Model.GetEntityTypes())
|
||||||
|
{
|
||||||
|
// the IdentityPasskeyData entity was introduced in .NET 10 and is not mapped to a database table so should be ignored
|
||||||
|
if (entity.ClrType.Name != "IdentityPasskeyData")
|
||||||
{
|
{
|
||||||
var tableName = entity.GetTableName();
|
var tableName = entity.GetTableName();
|
||||||
if (tableName.StartsWith("AspNetUser"))
|
if (tableName.StartsWith("AspNetUser"))
|
||||||
@@ -142,6 +146,7 @@ namespace Oqtane.Database.PostgreSQL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override DbContextOptionsBuilder UseDatabase(DbContextOptionsBuilder optionsBuilder, string connectionString)
|
public override DbContextOptionsBuilder UseDatabase(DbContextOptionsBuilder optionsBuilder, string connectionString)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user