upgrade to .NET 6 and increment version to 3.0.0
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<Version>2.3.1</Version>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Version>3.0.0</Version>
|
||||
<Product>Oqtane</Product>
|
||||
<Authors>Shaun Walker</Authors>
|
||||
<Company>.NET Foundation</Company>
|
||||
@ -10,7 +10,7 @@
|
||||
<Copyright>.NET Foundation</Copyright>
|
||||
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
||||
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v2.3.1</PackageReleaseNotes>
|
||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v3.0.0</PackageReleaseNotes>
|
||||
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
||||
<RepositoryType>Git</RepositoryType>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
@ -29,9 +29,9 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="EFCore.NamingConventions" Version="5.0.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.4" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.2" />
|
||||
<PackageReference Include="EFCore.NamingConventions" Version="6.0.0-rc.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0-rc.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>Oqtane.Database.PostgreSQL</id>
|
||||
<version>2.3.1</version>
|
||||
<version>3.0.0</version>
|
||||
<authors>Shaun Walker</authors>
|
||||
<owners>.NET Foundation</owners>
|
||||
<title>Oqtane PostgreSQL Provider</title>
|
||||
@ -12,16 +12,16 @@
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<license type="expression">MIT</license>
|
||||
<projectUrl>https://github.com/oqtane/oqtane.framework</projectUrl>
|
||||
<releaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v2.3.1</releaseNotes>
|
||||
<releaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v3.0.0</releaseNotes>
|
||||
<icon>icon.png</icon>
|
||||
<tags>oqtane</tags>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="bin\net5.0\Oqtane.Database.PostgreSQL.dll" target="lib\net5.0" />
|
||||
<file src="bin\net5.0\Oqtane.Database.PostgreSQL.pdb" target="lib\net5.0" />
|
||||
<file src="bin\net5.0\EFCore.NamingConventions.dll" target="lib\net5.0" />
|
||||
<file src="bin\net5.0\Npgsql.EntityFrameworkCore.PostgreSQL.dll" target="lib\net5.0" />
|
||||
<file src="bin\net5.0\Npgsql.dll" target="lib\net5.0" />
|
||||
<file src="bin\net6.0\Oqtane.Database.PostgreSQL.dll" target="lib\net6.0" />
|
||||
<file src="bin\net6.0\Oqtane.Database.PostgreSQL.pdb" target="lib\net6.0" />
|
||||
<file src="bin\net6.0\EFCore.NamingConventions.dll" target="lib\net6.0" />
|
||||
<file src="bin\net6.0\Npgsql.EntityFrameworkCore.PostgreSQL.dll" target="lib\net6.0" />
|
||||
<file src="bin\net6.0\Npgsql.dll" target="lib\net6.0" />
|
||||
<file src="icon.png" target="" />
|
||||
</files>
|
||||
</package>
|
@ -104,23 +104,31 @@ namespace Oqtane.Database.PostgreSQL
|
||||
var tableName = entity.GetTableName();
|
||||
if (tableName.StartsWith("AspNetUser"))
|
||||
{
|
||||
// Replace table names
|
||||
// replace table name
|
||||
entity.SetTableName(RewriteName(entity.GetTableName()));
|
||||
|
||||
// Replace column names
|
||||
// replace column names
|
||||
foreach(var property in entity.GetProperties())
|
||||
{
|
||||
property.SetColumnName(RewriteName(property.GetColumnName()));
|
||||
property.SetColumnName(RewriteName(property.Name));
|
||||
}
|
||||
|
||||
// replace key names
|
||||
foreach(var key in entity.GetKeys())
|
||||
{
|
||||
key.SetName(RewriteName(key.GetName()));
|
||||
}
|
||||
|
||||
foreach(var index in entity.GetIndexes())
|
||||
// replace foreign key names
|
||||
foreach (var key in entity.GetForeignKeys())
|
||||
{
|
||||
index.SetName(RewriteName(index.GetName()));
|
||||
key.PrincipalKey.SetName(RewriteName(key.PrincipalKey.GetName()));
|
||||
}
|
||||
|
||||
// replace index names
|
||||
foreach (var index in entity.GetIndexes())
|
||||
{
|
||||
index.SetDatabaseName(RewriteName(index.GetDatabaseName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user