summary refs log tree commit diff
path: root/util/src/migrations/migrate_db_engine.js
diff options
context:
space:
mode:
Diffstat (limited to 'util/src/migrations/migrate_db_engine.js')
-rw-r--r--util/src/migrations/migrate_db_engine.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/src/migrations/migrate_db_engine.js b/util/src/migrations/migrate_db_engine.js

index 7b8b5784..eab30bc4 100644 --- a/util/src/migrations/migrate_db_engine.js +++ b/util/src/migrations/migrate_db_engine.js
@@ -30,7 +30,7 @@ const { async function main() { if (!process.env.TO) throw new Error("TO database env connection string not set"); - // manually arrange them because of foreign key + // manually arrange them because of foreign keys const entities = [ User, Guild, @@ -55,7 +55,7 @@ async function main() { Attachment, ]; - const newDB = await initDatabase(); + const oldDB = await initDatabase(); const type = process.env.TO.includes("://") ? process.env.TO.split(":")[0]?.replace("+srv", "") : "sqlite"; const isSqlite = type.includes("sqlite"); @@ -73,6 +73,7 @@ async function main() { try { for (const entity of entities) { const entries = await oldDB.manager.find(entity); + // @ts-ignore console.log("migrating " + entries.length + " " + entity.name + " ..."); @@ -90,6 +91,7 @@ async function main() { } } } + // @ts-ignore console.log("migrated " + entries.length + " " + entity.name); }