`EnableLegacyTimestampBehavior` if dbms is pgsql.

pull/11871/head
maliming 4 years ago
parent 34c89d2900
commit 0de2f6936d
No known key found for this signature in database
GPG Key ID: 096224957E51C89E

@ -19,6 +19,7 @@ public class AppNoLayersDatabaseManagementSystemChangeStep : ProjectBuildPipelin
break;
case DatabaseManagementSystem.PostgreSQL:
context.Symbols.Add("dbms:PostgreSQL");
ChangeEntityFrameworkCoreDependency(context, "Volo.Abp.EntityFrameworkCore.PostgreSql",
"Volo.Abp.EntityFrameworkCore.PostgreSql",
"AbpEntityFrameworkCorePostgreSqlModule");

@ -9,6 +9,10 @@ public class Program
{
public async static Task<int> Main(string[] args)
{
//<TEMPLATE-REMOVE IF-NOT='dbms:PostgreSQL'>
// https://www.npgsql.org/efcore/release-notes/6.0.html#opting-out-of-the-new-timestamp-mapping-logic
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
//</TEMPLATE-REMOVE>
var loggerConfiguration = new LoggerConfiguration()
#if DEBUG
.MinimumLevel.Debug()

@ -8,6 +8,10 @@ public class Program
{
public async static Task<int> Main(string[] args)
{
//<TEMPLATE-REMOVE IF-NOT='dbms:PostgreSQL'>
// https://www.npgsql.org/efcore/release-notes/6.0.html#opting-out-of-the-new-timestamp-mapping-logic
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
//</TEMPLATE-REMOVE>
var loggerConfiguration = new LoggerConfiguration()
#if DEBUG
.MinimumLevel.Debug()

@ -9,6 +9,10 @@ public class Program
{
public async static Task<int> Main(string[] args)
{
//<TEMPLATE-REMOVE IF-NOT='dbms:PostgreSQL'>
// https://www.npgsql.org/efcore/release-notes/6.0.html#opting-out-of-the-new-timestamp-mapping-logic
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
//</TEMPLATE-REMOVE>
var loggerConfiguration = new LoggerConfiguration()
#if DEBUG
.MinimumLevel.Debug()

@ -11,6 +11,10 @@ public class MyProjectNameDbContextFactory : IDesignTimeDbContextFactory<MyProje
{
public MyProjectNameDbContext CreateDbContext(string[] args)
{
//<TEMPLATE-REMOVE IF-NOT='dbms:PostgreSQL'>
// https://www.npgsql.org/efcore/release-notes/6.0.html#opting-out-of-the-new-timestamp-mapping-logic
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
//</TEMPLATE-REMOVE>
MyProjectNameEfCoreEntityExtensionMappings.Configure();
var configuration = BuildConfiguration();

@ -29,6 +29,10 @@ public class MyProjectNameEntityFrameworkCoreModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
//<TEMPLATE-REMOVE IF-NOT='dbms:PostgreSQL'>
// https://www.npgsql.org/efcore/release-notes/6.0.html#opting-out-of-the-new-timestamp-mapping-logic
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
//</TEMPLATE-REMOVE>
MyProjectNameEfCoreEntityExtensionMappings.Configure();
}

Loading…
Cancel
Save