diff --git a/database/src/AppDatabase.ts b/database/src/AppDatabase.ts index 43b726271..6e0fe7c08 100644 --- a/database/src/AppDatabase.ts +++ b/database/src/AppDatabase.ts @@ -113,8 +113,7 @@ export class AppDatabase { database: CONFIG.DB_DATABASE, port: CONFIG.DB_PORT, }) - // this.drizzleDataSource = drizzle({ client: this.drizzleConnection }) - this.drizzleDataSource = drizzle('mysql2://root@127.0.0.1:3306/gradido_test') + this.drizzleDataSource = drizzle({ client: this.drizzleConnection }) } } diff --git a/database/src/config/index.ts b/database/src/config/index.ts index cac1f8e44..3f7e24787 100644 --- a/database/src/config/index.ts +++ b/database/src/config/index.ts @@ -13,7 +13,7 @@ const database = { DB_CONNECT_RETRY_DELAY_MS: process.env.DB_CONNECT_RETRY_DELAY_MS ? Number.parseInt(process.env.DB_CONNECT_RETRY_DELAY_MS) : 500, - DB_HOST: process.env.DB_HOST ?? 'localhost', + DB_HOST: process.env.DB_HOST ?? '127.0.0.1', DB_PORT: process.env.DB_PORT ? Number.parseInt(process.env.DB_PORT) : 3306, DB_USER: process.env.DB_USER ?? 'root', DB_PASSWORD: process.env.DB_PASSWORD ?? '', diff --git a/database/src/queries/openaiThreads.test.ts b/database/src/queries/openaiThreads.test.ts index 3b4fc9a93..f6eb94c6e 100644 --- a/database/src/queries/openaiThreads.test.ts +++ b/database/src/queries/openaiThreads.test.ts @@ -1,5 +1,5 @@ import { eq } from 'drizzle-orm' -import { drizzle, MySql2Database } from 'drizzle-orm/mysql2' +import { MySql2Database } from 'drizzle-orm/mysql2' import { AppDatabase, drizzleDb } from '../AppDatabase' import { openaiThreadsTable } from '../schemas' import { @@ -15,11 +15,7 @@ let db: MySql2Database beforeAll(async () => { await appDB.init() db = drizzleDb() - try { - await db.delete(openaiThreadsTable) - } catch(e) { - console.error(JSON.stringify(e, null, 2)) - } + await db.delete(openaiThreadsTable) }) afterAll(async () => { await appDB.destroy()