latex-ub/services/web/migrations/20230616153016_user_features_updated_at_index.mjs
2025-05-05 12:24:05 +00:00

28 lines
483 B
JavaScript

/* eslint-disable no-unused-vars */
import Helpers from './lib/helpers.mjs'
const tags = ['saas']
const index = {
key: {
featuresUpdatedAt: 1,
},
name: 'featuresUpdatedAt_1',
}
const migrate = async client => {
const { db } = client
await Helpers.addIndexesToCollection(db.users, [index])
}
const rollback = async client => {
const { db } = client
await Helpers.dropIndexesFromCollection(db.users, [index])
}
export default {
tags,
migrate,
rollback,
}