2019-05-29 11:03:01 +02:00
|
|
|
module.exports = {
|
2019-09-05 11:14:54 +02:00
|
|
|
up: (queryInterface, Sequelize) => {
|
|
|
|
|
return queryInterface.sequelize.transaction(t => {
|
|
|
|
|
return Promise.all([
|
|
|
|
|
queryInterface.addColumn(
|
|
|
|
|
"RealEstateRequests",
|
|
|
|
|
"sizeRange",
|
|
|
|
|
{
|
|
|
|
|
type: Sequelize.STRING
|
|
|
|
|
},
|
|
|
|
|
{ transaction: t }
|
|
|
|
|
),
|
|
|
|
|
queryInterface.addColumn(
|
|
|
|
|
"RealEstateRequests",
|
|
|
|
|
"gardenSizeRange",
|
|
|
|
|
{
|
|
|
|
|
type: Sequelize.STRING
|
|
|
|
|
},
|
|
|
|
|
{ transaction: t }
|
|
|
|
|
),
|
|
|
|
|
queryInterface.addColumn(
|
|
|
|
|
"RealEstateRequests",
|
|
|
|
|
"priceRange",
|
|
|
|
|
{
|
|
|
|
|
type: Sequelize.STRING
|
|
|
|
|
},
|
|
|
|
|
{ transaction: t }
|
|
|
|
|
)
|
|
|
|
|
]);
|
|
|
|
|
});
|
|
|
|
|
},
|
2019-05-29 11:03:01 +02:00
|
|
|
|
2019-09-05 11:14:54 +02:00
|
|
|
down: (queryInterface, Sequelize) => {
|
|
|
|
|
return queryInterface.sequelize.transaction(t => {
|
|
|
|
|
return Promise.all([
|
|
|
|
|
queryInterface.removeColumn("RealEstateRequests", "sizeRange", {
|
|
|
|
|
transaction: t
|
|
|
|
|
}),
|
|
|
|
|
queryInterface.removeColumn("RealEstateRequests", "gardenSizeRange", {
|
|
|
|
|
transaction: t
|
|
|
|
|
}),
|
|
|
|
|
queryInterface.removeColumn("RealEstateRequests", "priceRange", {
|
|
|
|
|
transaction: t
|
2019-05-29 11:03:01 +02:00
|
|
|
})
|
2019-09-05 11:14:54 +02:00
|
|
|
]);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|