aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2014-06-11 11:09:28 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2014-06-11 11:09:28 -0500
commit713dde5b9d002b9257f7079c44214d672ea21463 (patch)
treee002b20b78049400927166dcd64016022d79e837
parent987a63514ff3c9c436084eaca8524dc577ae1a6e (diff)
downloadmediagoblin-713dde5b9d002b9257f7079c44214d672ea21463.tar.lz
mediagoblin-713dde5b9d002b9257f7079c44214d672ea21463.tar.xz
mediagoblin-713dde5b9d002b9257f7079c44214d672ea21463.zip
Adding comments in the migration explaining a bit what's going on.
This commit sponsored by Philip Horger. Thank you!
-rw-r--r--mediagoblin/db/migrations.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mediagoblin/db/migrations.py b/mediagoblin/db/migrations.py
index 94282f6d..8e0b5096 100644
--- a/mediagoblin/db/migrations.py
+++ b/mediagoblin/db/migrations.py
@@ -763,6 +763,7 @@ def fix_privilege_user_association_table(db):
privilege_user_assoc = inspect_table(
metadata, 'core__privileges_users')
+ # This whole process is more complex if we're dealing with sqlite
if db.bind.url.drivername == 'sqlite':
PrivilegeUserAssociation_R1.__table__.create(db.bind)
db.commit()
@@ -782,6 +783,7 @@ def fix_privilege_user_association_table(db):
privilege_user_assoc.drop()
new_privilege_user_assoc.rename('core__privileges_users')
+ # much simpler if postgres though!
else:
privilege_user_assoc.c.core__user_id.alter(name="privilege")
privilege_user_assoc.c.core__privilege_id.alter(name="user")