This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
outline/server/migrations/20180808061353-cleanup.js

19 lines
675 B
JavaScript

module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.renameColumn('documents', 'atlasId', 'collectionId');
await queryInterface.removeColumn('documents', 'private');
await queryInterface.addColumn('events', 'documentId', {
type: Sequelize.UUID,
allowNull: true,
});
},
down: async (queryInterface, Sequelize) => {
await queryInterface.renameColumn('documents', 'collectionId', 'atlasId');
await queryInterface.removeColumn('events', 'documentId');
await queryInterface.addColumn('documents', 'private', {
type: Sequelize.BOOLEAN,
allowNull: false,
defaultValue: true,
});
}
}