The solution lies in removing the explicit definition of the public schema in your classes.
So if you have this in your bar class
bar_id: Mapped[Integer] = mapped_column(
ForeignKey("public.bar.id"), index=True, type_=Integer
)
And in your foo class
__table_args__ = (
{"schema": "public"},
)
Remove both public statements. Postgres does sometimes not explicitly name it that way and alembic then thinks it is a different FK and tries to recreate them.