From: Christopher Allan Webber Date: Fri, 11 Mar 2016 19:54:12 +0000 (-0800) Subject: Set target_metadata in alembic's env.py to Base.metadata X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ae44f97da499d8b4bca8af47e4814e732eb45592;p=mediagoblin.git 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. --- diff --git a/mediagoblin/db/migrations/env.py b/mediagoblin/db/migrations/env.py index c5f88219..43b7b247 100644 --- a/mediagoblin/db/migrations/env.py +++ b/mediagoblin/db/migrations/env.py @@ -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: