|
|
@ -1,7 +1,7 @@ |
|
|
|
import fs from 'fs'; |
|
|
|
import fs from 'fs'; |
|
|
|
import path from 'path'; |
|
|
|
import path from 'path'; |
|
|
|
import { promisify } from 'util'; |
|
|
|
import { promisify } from 'util'; |
|
|
|
import { Knex } from 'knex'; |
|
|
|
import { Knex } from 'knex'; |
|
|
|
|
|
|
|
|
|
|
|
import glob from 'glob'; |
|
|
|
import glob from 'glob'; |
|
|
|
import SqlClientFactory from '../../sql-client/lib/SqlClientFactory'; |
|
|
|
import SqlClientFactory from '../../sql-client/lib/SqlClientFactory'; |
|
|
@ -754,7 +754,7 @@ export default class KnexMigratorv2 { |
|
|
|
const vm = this; |
|
|
|
const vm = this; |
|
|
|
|
|
|
|
|
|
|
|
const trx = sqlClient.knex.isTransaction |
|
|
|
const trx = sqlClient.knex.isTransaction |
|
|
|
? sqlClient.knex as Knex.Transaction |
|
|
|
? (sqlClient.knex as Knex.Transaction) |
|
|
|
: await sqlClient.knex.transaction(); |
|
|
|
: await sqlClient.knex.transaction(); |
|
|
|
try { |
|
|
|
try { |
|
|
|
for (const query of upStatements) { |
|
|
|
for (const query of upStatements) { |
|
|
@ -921,7 +921,7 @@ export default class KnexMigratorv2 { |
|
|
|
const vm = this; |
|
|
|
const vm = this; |
|
|
|
|
|
|
|
|
|
|
|
const trx = sqlClient.knex.isTransaction |
|
|
|
const trx = sqlClient.knex.isTransaction |
|
|
|
? sqlClient.knex as Knex.Transaction |
|
|
|
? (sqlClient.knex as Knex.Transaction) |
|
|
|
: await sqlClient.knex.transaction(); |
|
|
|
: await sqlClient.knex.transaction(); |
|
|
|
try { |
|
|
|
try { |
|
|
|
for (const query of downStatements) { |
|
|
|
for (const query of downStatements) { |
|
|
|