05/17 fix migration script
This commit is contained in:
@@ -33,6 +33,8 @@ class RecoveryChallenge(db.Model):
|
||||
__tablename__ = 'recovery_challenges'
|
||||
|
||||
id = db.Column(INTEGER(unsigned=True), autoincrement=True, primary_key=True)
|
||||
# user_id must be UNSIGNED to match users.id (UNSIGNED primary key).
|
||||
# MySQL 8 enforces strict type compatibility on foreign key column pairs.
|
||||
user_id = db.Column(
|
||||
INTEGER(unsigned=True),
|
||||
db.ForeignKey('users.id', ondelete='CASCADE'),
|
||||
|
||||
Reference in New Issue
Block a user