Skip to content

Commit

Permalink
fix: include token in address index on brc20_total_balances (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcr authored Feb 2, 2024
1 parent d0f7dcc commit d8271eb
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* eslint-disable @typescript-eslint/naming-convention */
import { MigrationBuilder, ColumnDefinitions } from 'node-pg-migrate';

export const shorthands: ColumnDefinitions | undefined = undefined;

export function up(pgm: MigrationBuilder): void {
pgm.dropIndex('brc20_total_balances', ['address']);
pgm.createIndex('brc20_total_balances', ['address', 'brc20_deploy_id']);
}

export function down(pgm: MigrationBuilder): void {
pgm.dropIndex('brc20_total_balances', ['address', 'brc20_deploy_id']);
pgm.createIndex('brc20_total_balances', ['address']);
}

0 comments on commit d8271eb

Please sign in to comment.