* Created an extension for comparing the current and the outdated providerName for Sqlite
* Added usages for the CompareProviderNames
* Added another case if the providerName is the outdated SQLite
* Both cases use Sqlite, so there is no need to have duplicate code
(cherry picked from commit d0cd22b09d)
22 lines
580 B
C#
22 lines
580 B
C#
using Umbraco.Cms.Core;
|
|
|
|
namespace Umbraco.Cms.Persistence.EFCore;
|
|
|
|
internal static class StringExtensions
|
|
{
|
|
internal static bool CompareProviderNames(this string connectionProvider, string? compareString)
|
|
{
|
|
if (compareString is null)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
if (connectionProvider == compareString)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
return connectionProvider is "Microsoft.Data.SQLite" or Constants.ProviderNames.SQLLite && compareString is "Microsoft.Data.SQLite" or Constants.ProviderNames.SQLLite;
|
|
}
|
|
}
|