* Add migrations * Handle previousTitles when titles is updated * Add necessary test cases * Use previous title while searching * Rewrite logic to update previousTitles in beforeSave hook * Update weights * Update test to match new rank order * Add tooltip to inform user on document * Add code comment * Remove previous title tooltip * fix: Remove unused string, add model tests Co-authored-by: Tom Moor <tom.moor@gmail.com>
14 lines
325 B
JavaScript
14 lines
325 B
JavaScript
'use strict';
|
|
|
|
module.exports = {
|
|
up: async (queryInterface, Sequelize) => {
|
|
await queryInterface.addColumn("documents","previousTitles",{
|
|
type: Sequelize.ARRAY(Sequelize.STRING)
|
|
})
|
|
},
|
|
|
|
down: async (queryInterface, Sequelize) => {
|
|
await queryInterface.removeColumn("documents", "previousTitles");
|
|
}
|
|
};
|