mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 21:27:10 +00:00
misc: make index creation concurrently
This commit is contained in:
@@ -4,12 +4,12 @@ import { TableName } from "../schemas";
|
|||||||
|
|
||||||
export async function up(knex: Knex): Promise<void> {
|
export async function up(knex: Knex): Promise<void> {
|
||||||
await knex.raw(`
|
await knex.raw(`
|
||||||
CREATE INDEX IF NOT EXISTS ${TableName.IdentityAccessToken}_identityid_index
|
CREATE INDEX CONCURRENTLY IF NOT EXISTS ${TableName.IdentityAccessToken}_identityid_index
|
||||||
ON ${TableName.IdentityAccessToken} ("identityId")
|
ON ${TableName.IdentityAccessToken} ("identityId")
|
||||||
`);
|
`);
|
||||||
|
|
||||||
await knex.raw(`
|
await knex.raw(`
|
||||||
CREATE INDEX IF NOT EXISTS ${TableName.IdentityAccessToken}_identityuaclientsecretid_index
|
CREATE INDEX CONCURRENTLY IF NOT EXISTS ${TableName.IdentityAccessToken}_identityuaclientsecretid_index
|
||||||
ON ${TableName.IdentityAccessToken} ("identityUAClientSecretId")
|
ON ${TableName.IdentityAccessToken} ("identityUAClientSecretId")
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
@@ -23,3 +23,7 @@ export async function down(knex: Knex): Promise<void> {
|
|||||||
DROP INDEX IF EXISTS ${TableName.IdentityAccessToken}_identityuaclientsecretid_index
|
DROP INDEX IF EXISTS ${TableName.IdentityAccessToken}_identityuaclientsecretid_index
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const config = { transaction: false };
|
||||||
|
|
||||||
|
export { config };
|
||||||
|
|||||||
Reference in New Issue
Block a user