Skip to content

Commit

Permalink
allow to remove queue referenced by queueoptions
Browse files Browse the repository at this point in the history
  • Loading branch information
allgood committed Nov 10, 2024
1 parent c95952f commit 685243e
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { QueryInterface, DataTypes } from "sequelize";

export default {
up: async (queryInterface: QueryInterface) => {
await queryInterface.changeColumn("QueueOptions", "forwardQueueId", {
type: DataTypes.INTEGER,
references: { model: "Queues", key: "id" },
onDelete: "SET NULL",
onUpdate: "CASCADE",
allowNull: true
});
},

down: async (queryInterface: QueryInterface) => {
await queryInterface.changeColumn("QueueOptions", "forwardQueueId", {
type: DataTypes.INTEGER,
references: { model: "Queues", key: "id" },
allowNull: true
});
}
};

0 comments on commit 685243e

Please sign in to comment.