Set target_metadata in alembic's env.py to Base.metadata

This allows us to make use of automatically generated migrations, at
least for core.

* mediagoblin/db/migrations/env.py (target_metadata): Switch to gmg's
  Base.metadata.
This commit is contained in:
Christopher Allan Webber 2016-03-11 11:54:12 -08:00
parent c122a9d24e
commit ae44f97da4

View File

@ -15,7 +15,8 @@ fileConfig(config.config_file_name)
# for 'autogenerate' support
# from myapp import mymodel
# target_metadata = mymodel.Base.metadata
target_metadata = None
from mediagoblin.db.models import Base
target_metadata = Base.metadata
# other values from the config, defined by the needs of env.py,
# can be acquired: