Skip to content

Commit

Permalink
Add oracle prices index on ("marketId", "effectiveAtHeight") (backport
Browse files Browse the repository at this point in the history
…#2368) (#2372)

Co-authored-by: dydxwill <119354122+dydxwill@users.noreply.github.com>
  • Loading branch information
mergify[bot] and dydxwill authored Sep 26, 2024
1 parent 9533b99 commit 3eec191
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 3eec191

Please # to comment.