I am trying to get a composite index working between a polymorphic subclass and it’s parent. Alembic autogenerate does not seem to detect Indexes outside of __table_args__. I can’t use __table_args__ because, being in the subclass, it does not count my class as having a __table__. How do I create a composite Index between these? The goal is to have
Consider the following case: Let’s say I’m calling get_base_instance in a context where I kow it will return a Sub instance – maybe based on what args I’m passing. Now I want to pass the returned instance to do_something_with_sub: The problem is that my IDE complains about passing a Base instance to a method that only accepts a Sub instance.