Procházet zdrojové kódy

Merge pull request #15270 from overleaf/em-drop-history-display-index

Drop oveleaf.history.display index from projects collection

GitOrigin-RevId: 8fa393322f76f0a297182b32d5f296dd82f01f62
Eric Mc Sween před 2 roky
rodič
revize
781a827e05

+ 18 - 0
services/web/migrations/20231016101457_drop_history_display_index.js

@@ -0,0 +1,18 @@
+const Helpers = require('./lib/helpers')
+
+exports.tags = ['saas']
+
+const indexes = [
+  {
+    key: { 'overleaf.history.display': 1 },
+    name: 'overleaf.history.display_1',
+  },
+]
+
+exports.migrate = async ({ db }) => {
+  await Helpers.dropIndexesFromCollection(db.projects, indexes)
+}
+
+exports.rollback = async ({ db }) => {
+  await Helpers.addIndexesToCollection(db.projects, indexes)
+}