overleaf/services/web/migrations/lib/template.js
Eric Mc Sween 65f20a4d56 Merge pull request #18186 from overleaf/em-migration-dependencies
Add a migration helper checking dependent migrations

GitOrigin-RevId: 96aa6238b20115206554faaa4c2aefc537bbe7e8
2024-05-03 08:04:36 +00:00

20 lines
599 B
JavaScript

/* eslint-disable no-unused-vars */
const Helpers = require('./lib/helpers')
exports.tags = ['server-ce', 'server-pro', 'saas']
exports.migrate = async client => {
const { db } = client
// Are there migrations that need to run before this migration?
// Use the following helper to enforce the dependency:
//
// await Helpers.assertDependency('20200101000000_another_migration')
// await Helpers.addIndexesToCollection(db.wombats, [{ name: 1 }])
}
exports.rollback = async client => {
const { db } = client
// await Helpers.dropIndexesFromCollection(db.wombats, [{ name: 1 }])
}