Skip to content

Commit

Permalink
background index creation
Browse files Browse the repository at this point in the history
  • Loading branch information
felipao-mx committed Nov 6, 2023
1 parent 7415bc8 commit ea13412
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion speid/models/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,17 @@ class Transaction(Document, BaseModel):
'+stp_id',
'+speid_id',
'+clave_rastreo',
['+fecha_operacion', '+tipo'],
# The Unique-Sparse index skips over any document that is missing
# the indexed field (null values)
{'fields': ['+compound_key'], 'unique': True, 'sparse': True},
{
'fields': ['+stp_id', '+tipo'],
'partialFilterExpression': {'tipo': TipoTransaccion.retiro},
},
{
'fields': ['+fecha_operacion', '+tipo'],
'background': True
}
]
}

Expand Down

0 comments on commit ea13412

Please sign in to comment.