sequelize model unique code example
Example 1: set unique true sequelize
key: {
// needs to be unique
type: DataTypes.UUID,
allowNull: false,
unique: true
}
Example 2: sequelize unique
username: {
type: DataTypes.TEXT,
allowNull: false,
unique: true
},