sequelize-middleware/migrations/20200212093136-setUniqueCarsColors.js

16 lines
351 B
JavaScript
Raw Normal View History

2020-02-13 22:36:14 +01:00
module.exports = {
up: queryInterface => {
return queryInterface.addConstraint("CarsColors", ["CarId", "ColorId"], {
type: "unique",
name: "CarsColors_unique_carId_colorId"
});
},
down: queryInterface => {
return queryInterface.removeConstraint(
"CarsColors",
"CarsColors_unique_carId_colorId"
);
}
};