2019-09-05 11:14:54 +02:00
|
|
|
"use strict";
|
2019-06-18 13:13:16 +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(
|
|
|
|
|
"MarketAlerts",
|
|
|
|
|
"size",
|
|
|
|
|
{
|
|
|
|
|
type: Sequelize.INTEGER
|
|
|
|
|
},
|
|
|
|
|
{ transaction: t }
|
|
|
|
|
),
|
|
|
|
|
queryInterface.addColumn(
|
|
|
|
|
"MarketAlerts",
|
|
|
|
|
"gardenSize",
|
|
|
|
|
{
|
|
|
|
|
type: Sequelize.INTEGER
|
|
|
|
|
},
|
|
|
|
|
{ transaction: t }
|
|
|
|
|
),
|
|
|
|
|
queryInterface.addColumn(
|
|
|
|
|
"MarketAlerts",
|
|
|
|
|
"price",
|
|
|
|
|
{
|
|
|
|
|
type: Sequelize.INTEGER
|
|
|
|
|
},
|
|
|
|
|
{ transaction: t }
|
|
|
|
|
),
|
|
|
|
|
queryInterface.addColumn(
|
|
|
|
|
"MarketAlerts",
|
|
|
|
|
"municipality",
|
|
|
|
|
{
|
|
|
|
|
type: Sequelize.STRING
|
|
|
|
|
},
|
|
|
|
|
{ transaction: t }
|
|
|
|
|
),
|
|
|
|
|
queryInterface.addColumn(
|
|
|
|
|
"MarketAlerts",
|
|
|
|
|
"region",
|
|
|
|
|
{
|
|
|
|
|
type: Sequelize.STRING
|
|
|
|
|
},
|
|
|
|
|
{ transaction: t }
|
|
|
|
|
)
|
|
|
|
|
]);
|
|
|
|
|
});
|
|
|
|
|
},
|
2019-06-18 13:13:16 +02:00
|
|
|
|
2019-09-05 11:14:54 +02:00
|
|
|
down: (queryInterface, Sequelize) => {
|
|
|
|
|
return queryInterface.sequelize.transaction(t => {
|
|
|
|
|
return Promise.all([
|
|
|
|
|
queryInterface.removeColumn("MarketAlerts", "size", { transaction: t }),
|
|
|
|
|
queryInterface.removeColumn("MarketAlerts", "gardenSize", {
|
|
|
|
|
transaction: t
|
|
|
|
|
}),
|
|
|
|
|
queryInterface.removeColumn("MarketAlerts", "price", {
|
|
|
|
|
transaction: t
|
|
|
|
|
}),
|
|
|
|
|
queryInterface.removeColumn("MarketAlerts", "municipality", {
|
|
|
|
|
transaction: t
|
|
|
|
|
}),
|
|
|
|
|
queryInterface.removeColumn("MarketAlerts", "region", {
|
|
|
|
|
transaction: t
|
2019-06-18 13:13:16 +02:00
|
|
|
})
|
2019-09-05 11:14:54 +02:00
|
|
|
]);
|
|
|
|
|
});
|
|
|
|
|
}
|
2019-06-18 13:13:16 +02:00
|
|
|
};
|