Skip to content

Commit

Permalink
fix: operation indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcr committed Apr 23, 2024
1 parent 0e40d32 commit 1944115
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion migrations/1711575178682_brc20-operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ export function up(pgm: MigrationBuilder): void {
'brc20_operations_ticker_fk',
'FOREIGN KEY(ticker) REFERENCES brc20_tokens(ticker) ON DELETE CASCADE'
);
pgm.createIndex('brc20_operations', ['block_height', 'tx_index']);
pgm.createIndex('brc20_operations', ['operation']);
pgm.createIndex('brc20_operations', ['ticker', 'address']);
pgm.createIndex('brc20_operations', [
{ name: 'block_height', sort: 'DESC' },
{ name: 'tx_index', sort: 'DESC' },
]);
pgm.createIndex('brc20_operations', ['address', 'to_address']);
}

0 comments on commit 1944115

Please sign in to comment.