diff --git a/server/migrations/20230330181038-remove-column-userId-from-documents.js b/server/migrations/20230330181038-remove-column-userId-from-documents.js new file mode 100644 index 000000000..bdda59235 --- /dev/null +++ b/server/migrations/20230330181038-remove-column-userId-from-documents.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = { + async up(queryInterface, Sequelize) { + await queryInterface.removeColumn("documents", "userId"); + }, + + async down(queryInterface, Sequelize) { + await queryInterface.addColumn("documents", "userId", { + type: Sequelize.UUID, + allowNull: true, + references: { + model: "users", + }, + }); + }, +};