Merge pull request #478 from alphagov/make-password_changed_at-not-null

Users.password_changed_at not nullable
This commit is contained in:
Rebecca Law
2016-06-28 17:00:22 +01:00
committed by GitHub
3 changed files with 30 additions and 4 deletions

View File

@@ -47,7 +47,8 @@ class User(db.Model):
onupdate=datetime.datetime.utcnow)
_password = db.Column(db.String, index=False, unique=False, nullable=False)
mobile_number = db.Column(db.String, index=False, unique=False, nullable=False)
password_changed_at = db.Column(db.DateTime, index=False, unique=False, nullable=True)
password_changed_at = db.Column(db.DateTime, index=False, unique=False, nullable=False,
default=datetime.datetime.utcnow)
logged_in_at = db.Column(db.DateTime, nullable=True)
failed_login_count = db.Column(db.Integer, nullable=False, default=0)
state = db.Column(db.String, nullable=False, default='pending')