Skip to content

Commit

Permalink
Merge branch 'feat/identity/database-models' into feat/identity/site-…
Browse files Browse the repository at this point in the history
…token-middleware

* feat/identity/database-models:
  feat: allow email to be null
  • Loading branch information
lamkeewei committed Aug 23, 2021
2 parents 4e04a88 + 5ed7d10 commit faba2fb
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 faba2fb

Please sign in to comment.