From ae44f97da499d8b4bca8af47e4814e732eb45592 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Fri, 11 Mar 2016 11:54:12 -0800 Subject: [PATCH] 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. --- mediagoblin/db/migrations/env.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: -- 2.25.1