Код: Выделить всё
Build succeeded.
dotnet exec --depsfile /Users/x/RiderProjects/my-way-api/Infrastructure/bin/Debug/net9.0/Infrastructure.deps.json --additionalprobingpath /Users/x/.nuget/packages --runtimeconfig /Users/x/RiderProjects/my-way-api/Infrastructure/bin/Debug/net9.0/Infrastructure.runtimeconfig.json /Users/x/.dotnet/tools/.store/dotnet-ef/9.0.5/dotnet-ef/9.0.5/tools/net8.0/any/tools/netcoreapp2.0/any/ef.dll migrations remove --assembly /Users/x/RiderProjects/my-way-api/Infrastructure/bin/Debug/net9.0/Infrastructure.dll --project /Users/x/RiderProjects/my-way-api/Infrastructure/Infrastructure.csproj --startup-assembly /Users/x/RiderProjects/my-way-api/Infrastructure/bin/Debug/net9.0/Infrastructure.dll --startup-project /Users/x/RiderProjects/my-way-api/Infrastructure/Infrastructure.csproj --project-dir /Users/x/RiderProjects/my-way-api/Infrastructure/ --root-namespace Infrastructure --language C# --framework net9.0 --nullable --working-dir /Users/x/RiderProjects/my-way-api/Infrastructure --verbose
Using assembly 'Infrastructure'.
Using startup assembly 'Infrastructure'.
Using application base '/Users/x/RiderProjects/my-way-api/Infrastructure/bin/Debug/net9.0'.
Using working directory '/Users/x/RiderProjects/my-way-api/Infrastructure'.
Using root namespace 'Infrastructure'.
Using project directory '/Users/x/RiderProjects/my-way-api/Infrastructure/'.
Remaining arguments: .
Finding DbContext classes...
Finding IDesignTimeDbContextFactory implementations...
Found IDesignTimeDbContextFactory implementation 'DatabaseDesignTimeFactory'.
Found DbContext 'ApplicationDbContext'.
Finding DbContext classes in the project...
Using DbContext factory 'DatabaseDesignTimeFactory'.
Using context 'ApplicationDbContext'.
Finding design-time services referenced by assembly 'Infrastructure'...
Finding design-time services referenced by assembly 'Infrastructure'...
No referenced design-time services were found.
Finding design-time services for provider 'Npgsql.EntityFrameworkCore.PostgreSQL'...
Using design-time services from provider 'Npgsql.EntityFrameworkCore.PostgreSQL'.
Finding IDesignTimeServices implementations in assembly 'Infrastructure'...
No design-time services were found.
The model snapshot and the backing model of the last migration are different. Continuing under the assumption that the last migration was deleted manually.
Reverting the model snapshot.
Done.
< /code>
Это сообщение, которое я получаю, когда применяю в базе данных без подавления изменений ожидающих модели. < /p>
System.InvalidOperationException:
An error was generated for warning 'Microsoft.EntityFrameworkCore.Migrations.PendingModelChangesWarning':
The model for context 'ApplicationDbContext' has pending changes.
Add a new migration before updating the database.
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.EventDefinition`1.Log[TLoggerCategory](IDiagnosticsLogger`1 logger, TParam arg)
at Microsoft.EntityFrameworkCore.Diagnostics.RelationalLoggerExtensions.PendingModelChangesWarning(IDiagnosticsLogger`1 diagnostics, Type contextType)
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration)
at Npgsql.EntityFrameworkCore.PostgreSQL.Migrations.Internal.NpgsqlMigrator.Migrate(String targetMigration)
at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.UpdateDatabase(String targetMigration, String connectionString, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabaseImpl(String targetMigration, String connectionString, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabase.c__DisplayClass0_0.b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
Подробнее здесь: https://stackoverflow.com/questions/796 ... ot-working