[EFCore2.1] EnsureDeleted does not delete the [__EFMigrationsHistory] table
Posted: Tue 03 Jul 2018 14:26
I'm attempting to script out the deletion, migration and seeding of my code first context - calling:
This deletes any tables that were created as part of the migration, but the [__EFMigrationsHistory] table remains. When calling:
It naturally fails with the following:
Is there something I'm doing wrong?
Code: Select all
dbContext.Database.EnsureDeleted()
Code: Select all
dbContext.Database.Migrate()
Code: Select all
Microsoft.EntityFrameworkCore.Database.Command[20102]
Failed executing DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='0']
CREATE TABLE "__EFMigrationsHistory" (
"MigrationId" NVARCHAR2(150) NOT NULL,
"ProductVersion" NVARCHAR2(32) NOT NULL,
PRIMARY KEY ("MigrationId")
)
Devart.Data.Oracle.OracleException (0x80004005): ORA-00955: name is already used by an existing object