-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #301 from hirosystems/beta
release to master
- Loading branch information
Showing
22 changed files
with
585 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
migrations/1705363472553_locations-block-height-indexes.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* 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('locations', ['block_hash']); | ||
pgm.dropIndex('locations', ['block_height']); | ||
pgm.createIndex('locations', [ | ||
{ name: 'block_height', sort: 'DESC' }, | ||
{ name: 'tx_index', sort: 'DESC' }, | ||
]); | ||
} | ||
|
||
export function down(pgm: MigrationBuilder): void { | ||
pgm.dropIndex('locations', [ | ||
{ name: 'block_height', sort: 'DESC' }, | ||
{ name: 'tx_index', sort: 'DESC' }, | ||
]); | ||
pgm.createIndex('locations', ['block_hash']); | ||
pgm.createIndex('locations', ['block_height']); | ||
} |
14 changes: 14 additions & 0 deletions
14
migrations/1706894983174_brc20-total-balances-address-deploy-index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.