I'm trying to write a pyramid app that uses the cd34/apex project for authentication. In it, the models for auth are already part of the apex project, which are imported in at runtime. Alembic seems to ignore those models, even if I import them in the env.py.
I tried extending the classes from apex in my own models:
from apex.models import (
AuthUser,
AuthUserLog,
AuthGroup,
AuthID
)
class EAuthUser(AuthUser):
pass
class EAuthUserLog(AuthUserLog):
pass
class EAuthGroup(AuthGroup):
pass
class EAuthID(AuthID):
pass
but alembic still drops the tables when I use --autogenerate
:
op.drop_table('auth_user_log')
op.drop_table('auth_users')
op.drop_table('auth_groups')
op.drop_table('auth_id')
op.drop_table('auth_auth_groups')
Is there some magic I can do to make alembic ignore particular table names, or better yet, have it track and follow the model definitions in another project?