fix: adds uniqueness constraint to users email field
This commit is contained in:
@@ -5,7 +5,7 @@ from app.extensions import db
|
|||||||
class User(db.Model):
|
class User(db.Model):
|
||||||
id = mapped_column(db.Integer, primary_key=True, autoincrement=True)
|
id = mapped_column(db.Integer, primary_key=True, autoincrement=True)
|
||||||
username = mapped_column(db.String(255), nullable=False)
|
username = mapped_column(db.String(255), nullable=False)
|
||||||
email = mapped_column(db.String(255), nullable=False)
|
email = mapped_column(db.String(255), nullable=False, unique=True)
|
||||||
password = mapped_column(db.String(255), nullable=False)
|
password = mapped_column(db.String(255), nullable=False)
|
||||||
name = mapped_column(db.String(255), nullable=False)
|
name = mapped_column(db.String(255), nullable=False)
|
||||||
lastname = mapped_column(db.String(255), nullable=False)
|
lastname = mapped_column(db.String(255), nullable=False)
|
||||||
|
|||||||
Reference in New Issue
Block a user