mirror of
https://github.com/outline/outline.git
synced 2026-06-30 11:44:24 +03:00
25 lines
662 B
JavaScript
25 lines
662 B
JavaScript
"use strict";
|
|
|
|
/** @type {import('sequelize-cli').Migration} */
|
|
module.exports = {
|
|
async up(queryInterface, Sequelize) {
|
|
await queryInterface.addColumn("notifications", "accessRequestId", {
|
|
type: Sequelize.UUID,
|
|
allowNull: true,
|
|
references: {
|
|
model: "access_requests",
|
|
key: "id",
|
|
},
|
|
onDelete: "SET NULL",
|
|
onUpdate: "CASCADE",
|
|
});
|
|
|
|
await queryInterface.addIndex("notifications", ["accessRequestId"]);
|
|
},
|
|
|
|
async down(queryInterface) {
|
|
await queryInterface.removeIndex("notifications", ["accessRequestId"]);
|
|
await queryInterface.removeColumn("notifications", "accessRequestId");
|
|
},
|
|
};
|