WIP Bulk create not working.

This commit is contained in:
Naida Vatric
2020-01-21 01:19:35 +01:00
parent 0a181f742f
commit 42eddb3aa5
5 changed files with 46 additions and 7 deletions

View File

@@ -11,15 +11,18 @@ module.exports = (sequalize, DataTypes) => {
realEstateId: {
type: DataTypes.BIGINT,
allowNull: false,
unique: "uniquePriceRealEstate",
references: {
model: "RealEstate",
model: "RealEstates",
key: "id"
},
onUpdate: "CASCADE",
onDelete: "SET NULL"
},
price: DataTypes.REAL
price: {
type: DataTypes.REAL,
unique: "uniquePriceRealEstate"
}
});
PriceHistory.associate = models => {