From 59b3443eda7968534a3a3616db209f8a577a50f8 Mon Sep 17 00:00:00 2001 From: Roman Petriv Date: Fri, 8 Mar 2024 12:22:53 +0200 Subject: [PATCH] fix: use new DataSource instance for migration script (#200) --- .../migrationScripts/1709722093204-AddAddressTransferType.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/worker/src/migrationScripts/1709722093204-AddAddressTransferType.ts b/packages/worker/src/migrationScripts/1709722093204-AddAddressTransferType.ts index 408d6cdcb8..b2271ad154 100644 --- a/packages/worker/src/migrationScripts/1709722093204-AddAddressTransferType.ts +++ b/packages/worker/src/migrationScripts/1709722093204-AddAddressTransferType.ts @@ -3,7 +3,7 @@ import { DataSource } from "typeorm"; import yargs from "yargs"; import { hideBin } from "yargs/helpers"; import { setTimeout } from "timers/promises"; -import typeOrmCliDataSource from "../typeorm.config"; +import { typeOrmModuleOptions } from "../typeorm.config"; config(); @@ -55,6 +55,7 @@ const updateAddressTransfers = async (dataSource: DataSource, from: number, to: }; const main = async () => { + const typeOrmCliDataSource = new DataSource(typeOrmModuleOptions); await typeOrmCliDataSource.initialize(); if (!toTransferNumber) {