You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we moved to .Net 9 and update packages we got this issue:
Unhandled exception. System.AggregateException: One or more errors occurred. (An error was generated for warning 'Microsoft.EntityFrameworkCore.Migrations.PendingModelChangesWarning': The model for context 'PostgresContext' has pending changes. Add a new migration before updating the database. See https://aka.ms/efcore-docs-pending-changes. This exception can be suppressed or logged by passing event ID 'RelationalEventId.PendingModelChangesWarning' to the 'ConfigureWarnings' method in 'DbContext.OnConfiguring' or 'AddDbContext'.)
---> System.InvalidOperationException: An error was generated for warning 'Microsoft.EntityFrameworkCore.Migrations.PendingModelChangesWarning': The model for context 'PostgresContext' has pending changes. Add a new migration before updating the database. See https://aka.ms/efcore-docs-pending-changes. This exception can be suppressed or logged by passing event ID 'RelationalEventId.PendingModelChangesWarning' to the 'ConfigureWarnings' method in 'DbContext.OnConfiguring' or 'AddDbContext'.
at Microsoft.EntityFrameworkCore.Diagnostics.EventDefinition1.Log[TLoggerCategory](IDiagnosticsLogger1 logger, TParam arg)
at Microsoft.EntityFrameworkCore.Diagnostics.RelationalLoggerExtensions.PendingModelChangesWarning(IDiagnosticsLogger`1 diagnostics, Type contextType)
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.ValidateMigrations(Boolean useTransaction)
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration)
at Npgsql.EntityFrameworkCore.PostgreSQL.Migrations.Internal.NpgsqlMigrator.Migrate(String targetMigration)
at Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions.Migrate(DatabaseFacade databaseFacade)
at WorkflowCore.Persistence.EntityFramework.Services.EntityFrameworkPersistenceProvider.EnsureStoreExists()
at WorkflowCore.Services.WorkflowHost.StartAsync(CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at WorkflowCore.Services.WorkflowHost.Start()
at Cyclix.Workflow.WorkflowServiceCollectionExtensions.RegisterWorkflows(IApplicationBuilder app, Assembly[] assemblies)
Hi,
When we moved to .Net 9 and update packages we got this issue:
.AddWorkflow(options => options.UsePostgreSQL(connectionString: appSettings.ConnectionStrings.PostgresWorkflowDb, true, true))
`
`
WorkflowCore 3.13.0
WorkflowCore.Persistence.PostgreSQL 3.13.0
Microsoft.EntityFrameworkCore 9.0.1
P.S: Creating a new migration didn't solve this issue
The text was updated successfully, but these errors were encountered: