Files
old-web/app/migrations/20200121094500-add-constraint-priceHistory.js
2020-01-21 16:28:47 +01:00

11 lines
320 B
JavaScript

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