aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/models.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2014-06-10 18:02:34 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2014-06-10 18:02:34 -0500
commitc56a88b43e168196c8c4b3778fccde2497d2e32b (patch)
tree9b61d1977a121b8fa7ac2d91bf69648f2f9d87ad /mediagoblin/db/models.py
parent70bceff85fd678a7b6653b2bf377b075ebd11590 (diff)
downloadmediagoblin-c56a88b43e168196c8c4b3778fccde2497d2e32b.tar.lz
mediagoblin-c56a88b43e168196c8c4b3778fccde2497d2e32b.tar.xz
mediagoblin-c56a88b43e168196c8c4b3778fccde2497d2e32b.zip
Switch "user_id" to "privilege" and "privilege_id" to "user".
This builds on the previous code Natalie wrote, but makes some changes: - More direct alterations for non-sqlite code - In both cases, I've made it so that we switched the field names from privilege_id and user_id to user and privilege respectively. This way we can do the name swap, but in one case it's "easy": just changing the name. (In the sqlite case it's still tricky though.)
Diffstat (limited to 'mediagoblin/db/models.py')
-rw-r--r--mediagoblin/db/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py
index 77bfe14e..efc98b3b 100644
--- a/mediagoblin/db/models.py
+++ b/mediagoblin/db/models.py
@@ -877,11 +877,11 @@ class PrivilegeUserAssociation(Base):
__tablename__ = 'core__privileges_users'
- user_id = Column(
+ user = Column(
Integer,
ForeignKey(User.id),
primary_key=True)
- privilege_id = Column(
+ privilege = Column(
Integer,
ForeignKey(Privilege.id),
primary_key=True)