From b2881ef65774a73d8a2d3ca60696aea0e8626d4b Mon Sep 17 00:00:00 2001 From: hmalik88 Date: Tue, 3 Nov 2020 19:55:14 -0500 Subject: [PATCH] updated user model and migration to make ethAddress a mandatory field in the interest of time. --- migrations/202011031728-CreateUserTable.js | 2 +- models/User.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/migrations/202011031728-CreateUserTable.js b/migrations/202011031728-CreateUserTable.js index 2f35be1..41d4e11 100644 --- a/migrations/202011031728-CreateUserTable.js +++ b/migrations/202011031728-CreateUserTable.js @@ -33,7 +33,7 @@ module.exports = { type: Sequelize.STRING }, ethAddress: { - allowNull: true, + allowNull: false, type: Sequelize.STRING } }); diff --git a/models/User.js b/models/User.js index 376b7a0..4196220 100644 --- a/models/User.js +++ b/models/User.js @@ -34,7 +34,7 @@ module.exports = (sequelize, DataTypes, Deferrable) => { }, ethAddress: { type: DataTypes.STRING, - allowNull: true, + allowNull: false, unique: true } })