Files
outline/server/migrations/20251125012929-add-popularity-score-to-documents.js
Tom Moor b51692cdc5 feat: Add popularity scoring (#10721)
* Simple first pass

* Use findAllInBatches

* Add comments,views,revisions

* Add 'popular' tab to Home

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add 'Popular' tab to collections

* Boost search results based on popularityScore

* Move to unlogged temp table

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-25 13:11:05 +01:00

17 lines
403 B
JavaScript

"use strict";
/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.addColumn("documents", "popularityScore", {
type: Sequelize.FLOAT,
allowNull: false,
defaultValue: 0,
});
},
async down(queryInterface, Sequelize) {
await queryInterface.removeColumn("documents", "popularityScore");
},
};