I am using Entity Framework Core with Oracle and configuring the default schema in my context using HasDefaultSchema with the schema “PRODUCTMAX”. Index creation works correctly, but when I try to drop an index, the command generated by the migration does not include the schema, resulting in an error.
In my code, I am using migrationBuilder.DropIndex with the schema, index name, and table name parameters:
migrationBuilder.DropIndex(
name: "IX_ANALISENAOCONFORMIDADE_ANALISEID_TEXTO",
schema: "PRODUCTMAX",
table: "ANALISENAOCONFORMIDADE");
I expect this to generate the command:
DROP INDEX PRODUCTMAX.IX_ANALISENAOCONFORMIDADE_ANALISEID_TEXTO
But what is actually generated in the migration is:
DROP INDEX IX_ANALISENAOCONFORMIDADE_ANALISEID_TEXTO
Does anyone know why this is happening and how I can fix it so that the schema is correctly included in the DROP INDEX command?