Move last_seen to index
This commit is contained in:
parent
3adb771987
commit
2dcae564d0
@ -22,8 +22,8 @@ class User(UserMixin, db.Model):
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
username = db.Column(db.String(64), index=True, unique=True)
|
||||
password_hash = db.Column(db.String(128))
|
||||
posts = db.relationship('Post', backref='author', lazy='dynamic')
|
||||
last_seen = db.Column(db.DateTime, default=datetime.utcnow)
|
||||
posts = db.relationship('Post', backref='author', lazy='dynamic')
|
||||
|
||||
def __repr__(self):
|
||||
return '<User {}>'.format(self.username)
|
||||
|
Reference in New Issue
Block a user