mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 00:45:40 -05:00
65f20a4d56
Add a migration helper checking dependent migrations GitOrigin-RevId: 96aa6238b20115206554faaa4c2aefc537bbe7e8
20 lines
599 B
JavaScript
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 }])
|
|
}
|