Notification service #35

Merged
bilal.catic merged 26 commits from notification-service into master 2019-09-30 16:23:40 +02:00
2 changed files with 18 additions and 1 deletions
Showing only changes of commit f31355dd84 - Show all commits

View File

@@ -0,0 +1,15 @@
"use strict";
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.sequelize.query(
`UPDATE "SearchRequests" SET "adType" = 'SALE' WHERE "adType" = 'sell';`
);
},
down: (queryInterface, Sequelize) => {
return queryInterface.sequelize.query(
`UPDATE "SearchRequests" SET "adType" = 'sell' WHERE "adType" = 'SALE';`
);
}
};

View File

@@ -1,5 +1,7 @@
"use strict";
const { AD_TYPE } = require("../common/enums");
module.exports = (sequelize, DataTypes) => {
const SearchRequest = sequelize.define("SearchRequest", {
id: {
@@ -24,7 +26,7 @@ module.exports = (sequelize, DataTypes) => {
adType: {
type: DataTypes.TEXT,
allowNull: false,
defaultValue: "sell"
defaultValue: AD_TYPE.AD_TYPE_SALE
},
email: DataTypes.TEXT,
locality: DataTypes.TEXT,