From 5b44273b303dca27f7bda3f90855e07c2d89f2d3 Mon Sep 17 00:00:00 2001 From: pluja Date: Fri, 4 Sep 2020 18:23:31 +0200 Subject: [PATCH] Undo last commit --- app/models.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/models.py b/app/models.py index 71cf805..25d4d83 100644 --- a/app/models.py +++ b/app/models.py @@ -4,19 +4,19 @@ from flask_login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash followers = db.Table('followers', - db.Column('follower_id', db.Integer, db.ForeignKey('User.id')), - db.Column('followed_id', db.Integer, db.ForeignKey('User.id')) + db.Column('follower_id', db.Integer, db.ForeignKey('user.id')), + db.Column('followed_id', db.Integer, db.ForeignKey('user.id')) ) channel_association = db.Table('channel_association', - db.Column('channel_id', db.String(30), db.ForeignKey('channel.id')), - db.Column('User_id', db.Integer, db.ForeignKey('User.id')) -) # Association: CHANNEL --followed by--> [UserS] + db.Column('channel_id', db.String, db.ForeignKey('channel.id')), + db.Column('user_id', db.Integer, db.ForeignKey('user.id')) +) # Association: CHANNEL --followed by--> [USERS] twitter_association = db.Table('twitter_association', - db.Column('account_id', db.String(30), db.ForeignKey('twitterAccount.id')), - db.Column('User_id', db.Integer, db.ForeignKey('User.id')) -) # Association: ACCOUNT --followed by--> [UserS] + db.Column('account_id', db.String, db.ForeignKey('twitterAccount.id')), + db.Column('user_id', db.Integer, db.ForeignKey('user.id')) +) # Association: ACCOUNT --followed by--> [USERS] class User(UserMixin, db.Model): id = db.Column(db.Integer, primary_key=True)