Я пытаюсь использовать эту команду Dotnet ef Migrations удалить , и это сообщение, которое я получаю:
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>
Это сообщение, которое я получаю, когда применяю в базе данных без подавления изменений ожидающих модели. в ожидании изменений. Добавьте новую миграцию перед обновлением базы данных. Это исключение можно подавить или зарегистрировать путем передачи идентификатора события 'recativeAleventId.pendingModelChangesWarning' методу «configureWarnings» в «dbcontext.onconfiguring» или «addddbcontext».1.Log[TLoggerCategory](IDiagnosticsLogger< /code> 1 logger, tparam arg)
at microsoft.entityframeworkcore.diagnostics.relationalloggerextensions.pendingmodelchangeswarning (idiagnosticslogger`1 диагностика, тип контекста)
at at at at at at at at at at at at at at at at at at at at at at Microsoft.entityframeworkcore.migrations.internal.migrator.migrate (String TargetMigration)
at npgsql.entityframeworkcore.postgresql.migration Microsoft.entityframeworkcore.design.internal.migrationsoperations.UpdatedAtabase (String TargetMigration, String ConnectionString, String ContextType)
at microsoft.entityframeworkcore.design.operationexecutor.updatedAtAtimpl (String ConnectionStringtringtringtringtringString /> at microsoft.entityframeworkcore.design.operationexecutor.updatedatabase. c__displayclass0_0. b__0 ()
at microsoft.entityFrameWorkCore.design.operationExeCutor.OperationBase.execut Предупреждение 'Microsoft.EntityFrameWorkCore.migrations.pendingModelChangesWarning': модель для контекста «приложение Добавьте новую миграцию перед обновлением базы данных. Это исключение можно подавить или зарегистрировать, передав идентификатор события 'retainALeventId.pendingModelChangesWarning' методу «configureWarnings» в «dbcontext.onconfiguring» или «addddbcontext». Чистый сланец, но проблема продолжает происходить, миграция успешно применяется к БД. Это просто часть удаления, которая не работает, и даже если я не прибегаю к базе данных, миграция не удаляется.
Пожалуйста, помогите
Подробнее здесь: https://stackoverflow.com/questions/796 ... ot-working
Удаление миграций EF Core не работает ⇐ C#
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
EF Core 8: миграция добавляет AlterColumn в каждый столбец для последующих миграций.
Anonymous » » в форуме C# - 0 Ответы
- 21 Просмотры
-
Последнее сообщение Anonymous
-