Engine configuration happens way after all the models and tables have been defined so it's too late to add MySQL configuration then.
The problem with putting __table_args__ in the base class is that that field is also used for other bits of configuration like multi-column unique constraints. Every model that sets __table_args__ now also needs to check for an inherited value.
Next, __table_args__ supports dual syntax: a dictionary OR a tuple with the last item as a dictionary. This is too much to check for in the subclass:
class MyModel(BaseMixin, db.Model):
if isinstance(BaseMixin.__table_args__, dict):
__table_args__ = (..., BaseMixin.__table_args__)
else:
__table_args__ = (...) + (BaseMixin.__table_args__)
I don't even know if an `if` statement directly in a class statement works, but as you can see, this approach is just ugly.
Kiran