mirror of
https://github.com/IT4Change/gradido.git
synced 2026-04-25 23:37:36 +00:00
fix bug with missing use table call
This commit is contained in:
parent
2b9068560d
commit
25b344f6a6
@ -4,6 +4,8 @@ import { connectToDatabaseServer } from './prepare'
|
|||||||
import { MIGRATIONS_TABLE } from '../src/config/const'
|
import { MIGRATIONS_TABLE } from '../src/config/const'
|
||||||
|
|
||||||
export async function truncateTables(connection: Connection) {
|
export async function truncateTables(connection: Connection) {
|
||||||
|
const databaseName = CONFIG.DB_DATABASE
|
||||||
|
await connection.query(`USE \`${databaseName}\``)
|
||||||
const [tables] = await connection.query('SHOW TABLES')
|
const [tables] = await connection.query('SHOW TABLES')
|
||||||
const tableNames = (tables as any[]).map((table) => Object.values(table)[0])
|
const tableNames = (tables as any[]).map((table) => Object.values(table)[0])
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user