mirror of
https://github.com/outline/outline.git
synced 2026-06-30 03:34:24 +03:00
22 lines
544 B
JavaScript
22 lines
544 B
JavaScript
"use strict";
|
|
|
|
/** @type {import('sequelize-cli').Migration} */
|
|
module.exports = {
|
|
async up(queryInterface, Sequelize) {
|
|
await queryInterface.addColumn("collections", "displayPreferences", {
|
|
type: Sequelize.JSONB,
|
|
defaultValue: {},
|
|
});
|
|
|
|
await queryInterface.sequelize.query(`
|
|
UPDATE collections
|
|
SET "displayPreferences" = '{}'::jsonb
|
|
WHERE "displayPreferences" IS NULL
|
|
`);
|
|
},
|
|
|
|
async down(queryInterface) {
|
|
await queryInterface.removeColumn("collections", "displayPreferences");
|
|
},
|
|
};
|