dotnet-db-samples icon indicating copy to clipboard operation
dotnet-db-samples copied to clipboard

Oracle.EntityFrameworkCore does not delete sequences in compatibility mode

Open jhouben98 opened this issue 3 years ago • 1 comments

When UseOracleSQLCompatibility("11") option is set, identity columns are created with sequence+trigger.

But the sequence is never deleted when unapplying an migration - this causes some manual interaction, where one needs to

  • revert migration that created a table
  • delete sequence <- this should also be done by the migration
  • apply migration that creates the table again <- this doesn't work when the sequence is not deleted (sequence with same name exists)

SQL of Migration's Up: CREATE SEQUENCE SQ_xyz CREATE TABLE xyz CREATE TRIGGER TR_xyz

SQL of Migration's Down: DROP TABLE xyz

jhouben98 avatar Nov 30 '21 09:11 jhouben98

Thanks for reporting. I've been able to reproduce this problem. I filed a bug 33621900 to get this looked at.

alexkeh avatar Nov 30 '21 18:11 alexkeh

Bug is closed, but not fixed. This bug only affects a setting for use with DB version 11.2, which reached mainstream EOL in December 2021. Upgrade support will end for DB 11.2 in 2023.

alexkeh avatar Nov 06 '23 18:11 alexkeh