mirror of
https://github.com/IT4Change/gradido.git
synced 2026-03-01 12:44:43 +00:00
add missing 'use <table>' in clear db function
This commit is contained in:
parent
e3a7932660
commit
d5813b2f66
@ -4,6 +4,8 @@ import { connectToDatabaseServer } from './prepare'
|
||||
import { MIGRATIONS_TABLE } from '../src/config/const'
|
||||
|
||||
export async function truncateTables(connection: Connection) {
|
||||
const databaseName = CONFIG.DB_DATABASE
|
||||
await connection.query(`USE \`${databaseName}\``)
|
||||
const [tables] = await connection.query('SHOW TABLES')
|
||||
const tableNames = (tables as any[]).map((table) => Object.values(table)[0])
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user