Skip to content

Commit

Permalink
feat: allow email to be null
Browse files Browse the repository at this point in the history
  • Loading branch information
lamkeewei committed Aug 23, 2021
1 parent a9f6594 commit 5ed7d10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions database/migrations/20210708163619-create-users.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ module.exports = {
type: Sequelize.BIGINT,
},
email: {
allowNull: false,
allowNull: true,
unique: true,
type: Sequelize.TEXT,
validate: {
isEmail: true,
},
},
github_id: {
allowNull: true,
allowNull: false,
unique: true,
type: Sequelize.TEXT,
validate: {
Expand Down
4 changes: 2 additions & 2 deletions database/models/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ module.exports = (sequelize) => {
type: DataTypes.BIGINT,
},
email: {
allowNull: false,
allowNull: true,
unique: true,
type: DataTypes.TEXT,
validate: {
isEmail: true,
},
},
githubId: {
allowNull: true,
allowNull: false,
unique: true,
type: DataTypes.TEXT,
validate: {
Expand Down

0 comments on commit 5ed7d10

Please sign in to comment.