diff --git a/database/migrations/20210708163619-create-users.js b/database/migrations/20210708163619-create-users.js index d3133f193..d61b30f45 100644 --- a/database/migrations/20210708163619-create-users.js +++ b/database/migrations/20210708163619-create-users.js @@ -8,7 +8,7 @@ module.exports = { type: Sequelize.BIGINT, }, email: { - allowNull: false, + allowNull: true, unique: true, type: Sequelize.TEXT, validate: { @@ -16,7 +16,7 @@ module.exports = { }, }, github_id: { - allowNull: true, + allowNull: false, unique: true, type: Sequelize.TEXT, validate: { diff --git a/database/models/User.js b/database/models/User.js index f165377a8..a9ec6630e 100644 --- a/database/models/User.js +++ b/database/models/User.js @@ -21,7 +21,7 @@ module.exports = (sequelize) => { type: DataTypes.BIGINT, }, email: { - allowNull: false, + allowNull: true, unique: true, type: DataTypes.TEXT, validate: { @@ -29,7 +29,7 @@ module.exports = (sequelize) => { }, }, githubId: { - allowNull: true, + allowNull: false, unique: true, type: DataTypes.TEXT, validate: {