I spent a day trying to figure out what was wrong with my Alembic setup. It had been working correctly before, but suddenly everything broke, and Alembic started deleting all my tables. The problem was that Ruff removed the imports for my models, and I was importing the Base
class before importing its subclasses.