dotnet-db-samples
dotnet-db-samples copied to clipboard
Oracle.EntityFrameworkCore does not delete sequences in compatibility mode
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
Thanks for reporting. I've been able to reproduce this problem. I filed a bug 33621900 to get this looked at.
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.