Skip to content

Commit

Permalink
Add oracle prices index on ("marketId", "effectiveAtHeight") (#2368)
Browse files Browse the repository at this point in the history
  • Loading branch information
dydxwill authored Sep 26, 2024
1 parent 25fed3f commit 59b6b7a
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import * as Knex from 'knex';

export async function up(knex: Knex): Promise<void> {
await knex.raw(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS "oracle_prices_marketid_effectiveatheight_index" ON "oracle_prices" ("marketId", "effectiveAtHeight");
`);
}

export async function down(knex: Knex): Promise<void> {
await knex.raw(`
DROP INDEX CONCURRENTLY IF EXISTS "oracle_prices_marketid_effectiveatheight_index";
`);
}

export const config = {
transaction: false,
};

0 comments on commit 59b6b7a

Please sign in to comment.