fix: broken index migration

feat: add new index
This commit is contained in:
Paul
2021-11-23 08:57:17 +00:00
parent 1303dbc844
commit 788580a64f
2 changed files with 35 additions and 5 deletions

View File

@@ -108,6 +108,13 @@ pub async fn create_database() {
"channel": 1
},
"name": "channel"
},
{
"key": {
"channel": 1,
"_id": 1
},
"name": "channel_id_compound"
}
]
},
@@ -119,7 +126,7 @@ pub async fn create_database() {
get_db()
.run_command(
doc! {
"createIndexes": "messages",
"createIndexes": "channel_unreads",
"indexes": [
{
"key": {
@@ -144,7 +151,7 @@ pub async fn create_database() {
get_db()
.run_command(
doc! {
"createIndexes": "messages",
"createIndexes": "server_members",
"indexes": [
{
"key": {