Skip to content

Commit

Permalink
Add index in timestamp (#10525)
Browse files Browse the repository at this point in the history
  • Loading branch information
gastonponti authored Aug 28, 2023
1 parent bd6dd5f commit 3bbbd0a
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Knex } from 'knex'
import { REQUESTS_COLUMNS, REQUESTS_TABLE } from '../models/request'

export async function up(knex: Knex): Promise<void> {
return knex.schema.alterTable(REQUESTS_TABLE, (t) => {
t.index(REQUESTS_COLUMNS.timestamp)
})
}

export async function down(knex: Knex): Promise<void> {
return knex.schema.alterTable(REQUESTS_TABLE, (t) => {
t.dropIndex(REQUESTS_COLUMNS.timestamp)
})
}

0 comments on commit 3bbbd0a

Please sign in to comment.