diff --git a/api/src/database/migrations/20201105B-change-webhook-url-type.ts b/api/src/database/migrations/20201105B-change-webhook-url-type.ts index d1ad118cc5..3107d4d9dd 100644 --- a/api/src/database/migrations/20201105B-change-webhook-url-type.ts +++ b/api/src/database/migrations/20201105B-change-webhook-url-type.ts @@ -1,4 +1,6 @@ import { Knex } from 'knex'; +// @ts-ignore +import Client_Oracledb from 'knex/lib/dialects/oracledb'; import env from '../../env'; async function oracleAlterUrl(knex: Knex, type: string): Promise { @@ -10,7 +12,7 @@ async function oracleAlterUrl(knex: Knex, type: string): Promise { } export async function up(knex: Knex): Promise { - if (env.DB_CLIENT === 'oracledb') { + if (knex.client instanceof Client_Oracledb) { await oracleAlterUrl(knex, 'CLOB'); return; } diff --git a/api/src/database/migrations/20210312A-webhooks-collections-text.ts b/api/src/database/migrations/20210312A-webhooks-collections-text.ts index 09cd50b5c1..489e0253f5 100644 --- a/api/src/database/migrations/20210312A-webhooks-collections-text.ts +++ b/api/src/database/migrations/20210312A-webhooks-collections-text.ts @@ -1,4 +1,6 @@ import { Knex } from 'knex'; +// @ts-ignore +import Client_Oracledb from 'knex/lib/dialects/oracledb'; import env from '../../env'; async function oracleAlterCollections(knex: Knex, type: string): Promise { @@ -10,7 +12,7 @@ async function oracleAlterCollections(knex: Knex, type: string): Promise { } export async function up(knex: Knex): Promise { - if (env.DB_CLIENT === 'oracledb') { + if (knex.client instanceof Client_Oracledb) { await oracleAlterCollections(knex, 'CLOB'); return; }