email can't be null, username removed since email can't be null

This commit is contained in:
jackiettran
2025-11-24 15:41:35 -05:00
parent 6aac929ec1
commit 532f3014df
6 changed files with 59 additions and 85 deletions

View File

@@ -10,15 +10,10 @@ const User = sequelize.define(
defaultValue: DataTypes.UUIDV4,
primaryKey: true,
},
username: {
type: DataTypes.STRING,
unique: true,
allowNull: true,
},
email: {
type: DataTypes.STRING,
unique: true,
allowNull: true,
allowNull: false,
validate: {
isEmail: true,
},