05/17 fix migration script

This commit is contained in:
Nguyen Ngo
2026-05-17 18:33:01 -04:00
parent afc3250c48
commit e563693f40
2 changed files with 5 additions and 1 deletions
+2
View File
@@ -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'),