overleaf/services/web/migrations/20240730155209_create_project_imageName_index.js
Miguel Serrano 0346ba2698 [web] CE script to verify TexLive versions on startup (#19653)
* [web] CE script to verify TexLive versions on startup

---------

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: b99001d38468a775991a7284611aa333e956b919
2024-08-22 14:01:07 +00:00

18 lines
404 B
JavaScript

const Helpers = require('./lib/helpers')
exports.tags = ['server-ce', 'server-pro']
const index = {
key: { imageName: 1 },
name: 'imageName_1',
}
exports.migrate = async client => {
const { db } = client
await Helpers.addIndexesToCollection(db.projects, [index])
}
exports.rollback = async client => {
const { db } = client
await Helpers.dropIndexesFromCollection(db.projects, [index])
}