diff --git a/scripts/db/20210302105100_add_articles_index.js b/scripts/db/20210302105100_add_articles_index.js new file mode 100644 index 000000000..9449a32ea --- /dev/null +++ b/scripts/db/20210302105100_add_articles_index.js @@ -0,0 +1,12 @@ +// Run like: +// +// mongo "mongodb+srv:///app29923450" --username positron2 --password scripts/db/ + +db.articles.createIndex( + { + fair_ids: 1, + published: 1, + published_at: -1 + }, + { background: true } +)