add unique constraint - composite key to the RealEstates table
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
up: (queryInterface, Sequelize) => {
|
||||||
|
return queryInterface.addConstraint(
|
||||||
|
"RealEstates",
|
||||||
|
["originAgencyName", "agencyObjectId"],
|
||||||
|
{
|
||||||
|
type: "unique",
|
||||||
|
name: "agencyNameObjectIdUniqueKey"
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
|
down: (queryInterface, Sequelize) => {
|
||||||
|
return queryInterface.removeConstraint(
|
||||||
|
"RealEstates",
|
||||||
|
"agencyNameObjectIdUniqueKey"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user