feat: add queue and assoc with whatsapps

This commit is contained in:
canove
2021-01-08 17:41:08 -03:00
parent a12c9db731
commit 9f99245dc4
14 changed files with 217 additions and 7 deletions

View File

@@ -0,0 +1,16 @@
import { QueryInterface, DataTypes } from "sequelize";
module.exports = {
up: (queryInterface: QueryInterface) => {
return queryInterface.addColumn("Tickets", "queueId", {
type: DataTypes.INTEGER,
references: { model: "Queues", key: "id" },
onUpdate: "CASCADE",
onDelete: "SET NULL"
});
},
down: (queryInterface: QueryInterface) => {
return queryInterface.removeColumn("Tickets", "queueId");
}
};