The app uses two databases: tbapp-db and mpower-db.
tbapp-db has five tables, and mpower has 92 -
most of which are unused.
It is easy to find the mpower-db tables that are used:
run a search for the __bind_key__ keyword,
which SQLAlchemy uses to reference any database other than the default.
The search returns four results,
all in webapp/tbapi/tbapi/models/mpower.py:
class Patient(SerializeMixin, db.Model):
__bind_key__ = 'mpower'
__table__ = db.Model.metadata.tables['patients']
class User(SerializeMixin, db.Model):
__bind_key__ = 'mpower'
__table__ = db.Model.metadata.tables['users']
class UserAclLeaf(db.Model):
__bind_key__ = 'mpower'
__table__ = db.Model.metadata.tables['user_acl_leafs']
class IdentityProvider(db.Model):
__bind_key__ = 'mpower'
__table__ = db.Model.metadata.tables['identity_providers']
Theoretically, we can remove all other tables from mpower-db
without running into any problems.
The app uses two databases:
tbapp-db
andmpower-db
.tbapp-db
has five tables, andmpower
has 92 - most of which are unused.It is easy to find the
mpower-db
tables that are used: run a search for the__bind_key__
keyword, which SQLAlchemy uses to reference any database other than the default.The search returns four results, all in
webapp/tbapi/tbapi/models/mpower.py
:Theoretically, we can remove all other tables from
mpower-db
without running into any problems.