From: Christopher Allan Webber Date: Wed, 11 Jun 2014 16:09:28 +0000 (-0500) Subject: Adding comments in the migration explaining a bit what's going on. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=713dde5b9d002b9257f7079c44214d672ea21463;p=mediagoblin.git Adding comments in the migration explaining a bit what's going on. This commit sponsored by Philip Horger. Thank you! --- 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")