-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd6dd5f
commit 3bbbd0a
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
...ivacy/signer/src/common/database/migrations/20230828180024_add-request-timestamp-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 @@ | ||
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) | ||
}) | ||
} |