2021-07-21 06:34:09 -04:00
|
|
|
/* eslint-disable no-unused-vars */
|
|
|
|
|
2024-10-02 05:32:13 -04:00
|
|
|
import Helpers from './lib/helpers.mjs'
|
2021-07-21 06:34:09 -04:00
|
|
|
|
2024-10-02 05:32:13 -04:00
|
|
|
const tags = ['server-ce', 'server-pro', 'saas']
|
2021-07-21 06:34:09 -04:00
|
|
|
|
2024-10-02 05:32:13 -04:00
|
|
|
const migrate = async client => {
|
2021-07-21 06:34:09 -04:00
|
|
|
const { db } = client
|
2024-05-02 08:42:48 -04:00
|
|
|
// Are there migrations that need to run before this migration?
|
|
|
|
// Use the following helper to enforce the dependency:
|
|
|
|
//
|
|
|
|
// await Helpers.assertDependency('20200101000000_another_migration')
|
|
|
|
|
2021-07-21 06:34:09 -04:00
|
|
|
// await Helpers.addIndexesToCollection(db.wombats, [{ name: 1 }])
|
|
|
|
}
|
|
|
|
|
2024-10-02 05:32:13 -04:00
|
|
|
const rollback = async client => {
|
2021-07-21 06:34:09 -04:00
|
|
|
const { db } = client
|
2022-01-10 06:36:18 -05:00
|
|
|
// await Helpers.dropIndexesFromCollection(db.wombats, [{ name: 1 }])
|
2021-07-21 06:34:09 -04:00
|
|
|
}
|
2024-10-02 05:32:13 -04:00
|
|
|
|
|
|
|
export default {
|
|
|
|
tags,
|
|
|
|
migrate,
|
|
|
|
rollback,
|
|
|
|
}
|