Skip to content

Commit

Permalink
fix: use new DataSource instance for migration script (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
Romsters authored Mar 8, 2024
1 parent 703345a commit 59b3443
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 59b3443

Please sign in to comment.