From c56a88b43e168196c8c4b3778fccde2497d2e32b Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Tue, 10 Jun 2014 18:02:34 -0500 Subject: 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.) --- mediagoblin/db/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mediagoblin/db/models.py') 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) -- cgit v1.2.3