This commit is contained in:
einhorn_b 2021-09-23 13:25:38 +02:00
parent 9e7f74b176
commit 91d51ea7c3
2 changed files with 6 additions and 1 deletions

View File

@ -417,7 +417,6 @@ jobs:
env: env:
MARIADB_ALLOW_EMPTY_PASSWORD: 1 MARIADB_ALLOW_EMPTY_PASSWORD: 1
MARIADB_USER: root MARIADB_USER: root
MARIADB_DATABASE: gradido_community_test
options: --health-cmd="mysqladmin ping" options: --health-cmd="mysqladmin ping"
--health-interval=5s --health-interval=5s
--health-timeout=5s --health-timeout=5s

View File

@ -25,6 +25,12 @@ export default async (): Promise<void> => {
DEFAULT CHARACTER SET utf8mb4 DEFAULT CHARACTER SET utf8mb4
DEFAULT COLLATE utf8mb4_unicode_ci;`) 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 // Check if old migration table is present, delete if needed
const [rows] = await con.query(`SHOW TABLES FROM \`${CONFIG.DB_DATABASE}\` LIKE 'migrations';`) const [rows] = await con.query(`SHOW TABLES FROM \`${CONFIG.DB_DATABASE}\` LIKE 'migrations';`)
if ((<RowDataPacket>rows).length > 0) { if ((<RowDataPacket>rows).length > 0) {