Current location

narf Source control manager Git

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2016-03-11 11:54:12 -0800
committerChristopher Allan Webber <cwebber@dustycloud.org>2016-03-26 11:39:07 -0700
commitae44f97da499d8b4bca8af47e4814e732eb45592 (patch)
treecf766437c2f74333d16054ed9774324de1759ee6
parentc122a9d24e8f1e55977c1bb29cdea539ec6baacf (diff)
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.
-rw-r--r--mediagoblin/db/migrations/env.py3
1 files changed, 2 insertions, 1 deletions
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: