add migration and update model to include email frequency in search req

This commit is contained in:
Bilal Catic
2019-11-01 11:43:08 +01:00
parent a0449f7ffd
commit 1117592f4c
2 changed files with 21 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
"use strict";
const { EMAIL_FREQUENCY } = require("../common/enums");
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.addColumn("SearchRequests", "emailFrequency", {
type: Sequelize.TEXT,
defaultValue: EMAIL_FREQUENCY.ASAP.stringId
});
},
down: (queryInterface, Sequelize) => {
return queryInterface.removeColumn("SearchRequests", "emailFrequency");
}
};