mirror of
https://github.com/outline/outline.git
synced 2026-06-28 10:44:25 +03:00
35ff70bf14
Co-authored-by: Tom Moor <tom.moor@gmail.com>
28 lines
738 B
JavaScript
28 lines
738 B
JavaScript
"use strict";
|
|
|
|
module.exports = {
|
|
async up(queryInterface, Sequelize) {
|
|
await queryInterface.sequelize.transaction(async (transaction) => {
|
|
await queryInterface.addColumn("collections", "archivedAt", {
|
|
type: Sequelize.DATE,
|
|
allowNull: true,
|
|
transaction,
|
|
});
|
|
await queryInterface.addIndex("collections", ["archivedAt"], {
|
|
transaction,
|
|
});
|
|
});
|
|
},
|
|
|
|
async down(queryInterface) {
|
|
await queryInterface.sequelize.transaction(async (transaction) => {
|
|
await queryInterface.removeIndex("collections", ["archivedAt"], {
|
|
transaction,
|
|
});
|
|
await queryInterface.removeColumn("collections", "archivedAt", {
|
|
transaction,
|
|
});
|
|
});
|
|
},
|
|
};
|