Skip to content

Commit

Permalink
Fix: index creation
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Sep 29, 2023
1 parent 1142f63 commit ba37f66
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cmd/indexer/indexer/indices.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,19 @@ func (bi *BlockchainIndexer) createIndices(ctx context.Context) error {

// Ticket updates
ticketUpdate := (*ticket.TicketUpdate)(nil)
if err := bi.Storage.CreateIndex(ctx, "ticket_updates_level_idx", "level", ticketUpdate); err != nil {
return err
}
if err := bi.Storage.CreateIndex(ctx, "ticket_updates_operation_id_idx", "operation_id", ticketUpdate); err != nil {
return err
}
if err := bi.Storage.CreateIndex(ctx, "ticket_updates_ticketer_id_idx", "ticketer_id", ticketUpdate); err != nil {
if err := bi.Storage.CreateIndex(ctx, "ticket_updates_ticket_id_idx", "ticket_id", ticketUpdate); err != nil {
return err
}

// Tickets
tickets := (*ticket.Ticket)(nil)
if err := bi.Storage.CreateIndex(ctx, "ticket_level_idx", "level", tickets); err != nil {
return err
}

Expand Down

0 comments on commit ba37f66

Please sign in to comment.