I have a problem with generating migration script from existing migration files, via command line, either Script-Migration or dotnet ef migrations script.
The migration file contains the following:
migrationBuilder.DropIndex(
name: "IX_CAR_CAR_ID",
schema: "AUTO",
table: "CARS",
column: "CAR_ID");
The generated SQL script contains SQL that fails during database update.
Expected result:
SQL script should contain schema in the drop index command:
DROP INDEX "AUTO"."IX_CAR_CAR_ID"
Actual result:
SQL script does not contain schema in the drop index command:
DROP INDEX "IX_CAR_CAR_ID"
I have fixed that by manual modification of the migration file, so instead of migrationBuilder.DropIndex, I use
migrationBuilder.Sql("DROP INDEX \"AUTO\".\"IX_CAR_CAR_ID\"").
Well, that solves the problem for me, but does not remove the cause.
I have tried the same with MsSQL server and the result is valid:
DROP INDEX [IX_CAR_CAR_ID] ON [AUTO].[CARS];
so, I assume it might be Oracle only related issue.
Using:
Microsoft.EntityFrameworkCore version 5.0.17
Oracle.EntityFrameworkCore version 5.21.61
My question: does anybony know whether this is a bug in one of the Oracle packages?