From 91d51ea7c3b5911cb612768a19a70b22d58ee5b5 Mon Sep 17 00:00:00 2001 From: einhorn_b Date: Thu, 23 Sep 2021 13:25:38 +0200 Subject: [PATCH] fix 2 --- .github/workflows/test.yml | 1 - database/src/prepare.ts | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e1b0ca20c..ed959e4fe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -417,7 +417,6 @@ jobs: env: MARIADB_ALLOW_EMPTY_PASSWORD: 1 MARIADB_USER: root - MARIADB_DATABASE: gradido_community_test options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=5s diff --git a/database/src/prepare.ts b/database/src/prepare.ts index 440289aea..fda4b4e13 100644 --- a/database/src/prepare.ts +++ b/database/src/prepare.ts @@ -25,6 +25,12 @@ export default async (): Promise => { DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;`) + // Create Database `gradido_community_test` for tests + await con.query(` + CREATE DATABASE IF NOT EXISTS ${CONFIG.DB_DATABASE}_test + DEFAULT CHARACTER SET utf8mb4 + DEFAULT COLLATE utf8mb4_unicode_ci;`) + // Check if old migration table is present, delete if needed const [rows] = await con.query(`SHOW TABLES FROM \`${CONFIG.DB_DATABASE}\` LIKE 'migrations';`) if ((rows).length > 0) {