diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a05426844..4c9918e23 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -470,7 +470,7 @@ jobs: run: echo "::set-output name=id::$(docker network ls | grep github_network | awk '{ print $1 }')" id: network - name: Start database migration - run: docker run --network ${{ steps.network.outputs.id }} --name=database --env NODE_ENV=production --env DB_HOST=mariadb -d gradido/database:production_up + run: docker run --network ${{ steps.network.outputs.id }} --name=database --env NODE_ENV=production --env DB_HOST=mariadb --env DB_DATABASE=gradido_community_test -d gradido/database:production_up - name: get database migration container id run: echo "::set-output name=id::$(docker container ls | grep database | awk '{ print $1 }')" id: database_container diff --git a/database/src/prepare.ts b/database/src/prepare.ts index fda4b4e13..440289aea 100644 --- a/database/src/prepare.ts +++ b/database/src/prepare.ts @@ -25,12 +25,6 @@ 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) {