diff --git a/files/classes/badges.py b/files/classes/badges.py index 59f489267..be1bb6b6d 100644 --- a/files/classes/badges.py +++ b/files/classes/badges.py @@ -32,7 +32,7 @@ class Badge(Base): __tablename__ = "badges" - user_id = Column(Integer, ForeignKey('users.id'), primary_key=True) + user_id = Column(Integer, ForeignKey("users.id"), primary_key=True) badge_id = Column(Integer, ForeignKey('badge_defs.id'), primary_key=True) description = Column(String) url = Column(String) diff --git a/files/classes/hats.py b/files/classes/hats.py index 746ffc73f..354e1ba28 100644 --- a/files/classes/hats.py +++ b/files/classes/hats.py @@ -15,7 +15,7 @@ class HatDef(Base): id = Column(Integer, primary_key=True) name = Column(String) description = Column(String) - author_id = Column(Integer, ForeignKey('users.id')) + author_id = Column(Integer, ForeignKey("users.id")) price = Column(Integer) submitter_id = Column(Integer, ForeignKey("users.id")) created_utc = Column(Integer) @@ -48,7 +48,7 @@ class HatDef(Base): class Hat(Base): __tablename__ = "hats" - user_id = Column(Integer, ForeignKey('users.id'), primary_key=True) + user_id = Column(Integer, ForeignKey("users.id"), primary_key=True) hat_id = Column(Integer, ForeignKey('hat_defs.id'), primary_key=True) equipped = Column(Boolean, default=False) created_utc = Column(Integer) diff --git a/files/classes/views.py b/files/classes/views.py index b8984db8f..4c55bda10 100644 --- a/files/classes/views.py +++ b/files/classes/views.py @@ -11,8 +11,8 @@ from files.helpers.sorting_and_time import make_age_string class ViewerRelationship(Base): __tablename__ = "viewers" - user_id = Column(Integer, ForeignKey('users.id'), primary_key=True) - viewer_id = Column(Integer, ForeignKey('users.id'), primary_key=True) + user_id = Column(Integer, ForeignKey("users.id"), primary_key=True) + viewer_id = Column(Integer, ForeignKey("users.id"), primary_key=True) last_view_utc = Column(Integer) created_utc = Column(Integer)