Skip to content

Commit

Permalink
feat(users): add privacy consent field (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonVreling authored Sep 22, 2020
1 parent ab39814 commit 3275455
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions migrations/20200810161400-add-privacy-consent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
up: (queryInterface, Sequelize) => queryInterface.addColumn(
'users',
'privacy_consent',
{
type: Sequelize.DATE,
allowNull: true
},
),
down: (queryInterface) => queryInterface.removeColumn('users', 'privacy_consent')
};
4 changes: 4 additions & 0 deletions models/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ const User = sequelize.define('user', {
allowNull: false,
defaultValue: false
},
privacy_consent: {
type: Sequelize.DATE,
allowNull: true
},
first_name: {
type: Sequelize.STRING,
allowNull: false,
Expand Down

0 comments on commit 3275455

Please sign in to comment.