From 28520d6de81871161fcd68b9801547873bc5eac0 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Mon, 27 Dec 2021 16:03:20 +0100 Subject: [PATCH] minor improvements --- database/src/helpers.ts | 2 +- database/src/index.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/database/src/helpers.ts b/database/src/helpers.ts index 1ef8b5d1f..0c15042a8 100644 --- a/database/src/helpers.ts +++ b/database/src/helpers.ts @@ -21,7 +21,7 @@ const migration = new Migration({ dir: '../database/migrations/', // CONFIG.MIGRATIONS_DIRECTORY, }) -const initialize = async () => { +const initialize = async (): Promise => { await migration.initialize() } diff --git a/database/src/index.ts b/database/src/index.ts index 5be8f4edb..488d098d3 100644 --- a/database/src/index.ts +++ b/database/src/index.ts @@ -19,7 +19,6 @@ const run = async (command: string) => { throw new Error(`Couldn't open connection to database`) } - // Database connection for Migrations await migration.initialize() // Execute command @@ -32,7 +31,7 @@ const run = async (command: string) => { break case 'reset': // TODO protect from production - await resetDB(false) // use for resetting database + await resetDB() // use for resetting database break case 'seed': // TODO protect from production