Skip to content

Commit

Permalink
feat(events): Add option to make events fully vegetarian (#967)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonVreling committed Jul 10, 2023
1 parent 72ec815 commit 64b7712
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions migrations/20230709170940-add-vegetarian-column-to-events.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
up: (queryInterface, Sequelize) => queryInterface.addColumn(
'events',
'vegetarian',
{ type: Sequelize.BOOLEAN, allowNull: false, defaultValue: false }
),
down: (queryInterface) => queryInterface.removeColumn('events', 'vegetarian')
};
5 changes: 5 additions & 0 deletions models/Event.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,11 @@ const Event = sequelize.define(
max: { args: [4], msg: 'You cannot offer more than 4 meals per day' },
},
},
vegetarian: {
type: Sequelize.BOOLEAN,
allowNull: false,
defaultValue: false,
},
accommodation_type: {
type: Sequelize.STRING,
allowNull: false,
Expand Down

0 comments on commit 64b7712

Please sign in to comment.