diff --git a/migrations/20230709170940-add-vegetarian-column-to-events.js b/migrations/20230709170940-add-vegetarian-column-to-events.js new file mode 100644 index 00000000..1e3a42f4 --- /dev/null +++ b/migrations/20230709170940-add-vegetarian-column-to-events.js @@ -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') +}; diff --git a/models/Event.js b/models/Event.js index f3c76e18..62d2be8d 100644 --- a/models/Event.js +++ b/models/Event.js @@ -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,