Files
outline/server/migrations/20221111171828-fix-user-constraints.js
Tom Moor 6788005115 Add missing team->user constraint (#4411)
* Add missing team->user constraint

* fix: teamPermanentDeleter cannot complete when team has domains
2022-11-11 09:40:52 -08:00

20 lines
409 B
JavaScript

'use strict';
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.changeColumn("users", "teamId", {
type: Sequelize.UUID,
onDelete: "cascade",
references: {
model: "teams",
},
});
},
down: async (queryInterface, Sequelize) => {
await queryInterface.changeColumn("users", "teamId", {
type: Sequelize.UUID,
});
}
};