WIP Added model, migration and bulk upsert fnc.

This commit is contained in:
Naida Vatric
2020-01-21 16:28:47 +01:00
parent 42eddb3aa5
commit 8d3f001678
5 changed files with 65 additions and 22 deletions

View File

@@ -0,0 +1,10 @@
"use strict";
module.exports = {
up: (queryInterface, Sequelize) =>
queryInterface.addConstraint("PriceHistory", ["realEstateId", "price"], {
type: "unique",
name: "uniquePriceRealEstate"
}),
down: queryInterface =>
queryInterface.removeConstraint("PriceHistory", "uniquePriceRealEstate")
};