11
I have two tables sharing the same name but located in different databases:
class Lcn(db.Model):
__tablename__ = 'lcn'
class LcnRemote(db.Model):
__bind_key__ = 'remote'
__tablename__ = 'lcn'
It seems SQLAlchemy doesn't like that. It says:
sqlalchemy.exc.InvalidRequestError: Table 'lcn' is already defined for this MetaData instance. Specify 'extend_existing=True' to redefine options and columns on an existing Table object.
Is there a way to solve this without having to rename one of my tables?