From 61a9f028993ba60f6d821ce9c86127b72ad32a0b Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Wed, 25 Sep 2024 17:01:14 +0200 Subject: [PATCH] fix WIP --- CHANGELOG.md | 2 +- packages/api/src/proc/databaseConnectionProcess.js | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3778d63..8846f433 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ Builds: - ADDED: Clickhouse support (#532) - ADDED: MySQL - specify table engine, show table engine in table list - FIXED: Hidden primary key name in PK editor for DB engines with anonymous PK (MySQL) -- CHANGED: Import/export dialog is now tab instead of modal +- CHANGED: Import/export dialog is now tacub instead of modal - ADDED: Saving import/export job - REMOVED: Ability to reopen export/import wizard from generated script. This was a bit hack, now you could save import/export job instead - ADDED: Autodetect CSV delimited diff --git a/packages/api/src/proc/databaseConnectionProcess.js b/packages/api/src/proc/databaseConnectionProcess.js index fb5685b7..7efbc8c8 100644 --- a/packages/api/src/proc/databaseConnectionProcess.js +++ b/packages/api/src/proc/databaseConnectionProcess.js @@ -1,7 +1,7 @@ const stableStringify = require('json-stable-stringify'); const { splitQuery } = require('dbgate-query-splitter'); const childProcessChecker = require('../utility/childProcessChecker'); -const { extractBoolSettingsValue, extractIntSettingsValue, getLogger } = require('dbgate-tools'); +const { extractBoolSettingsValue, extractIntSettingsValue, getLogger, isCompositeDbName } = require('dbgate-tools'); const requireEngineDriver = require('../utility/requireEngineDriver'); const connectUtility = require('../utility/connectUtility'); const { handleProcessCommunication } = require('../utility/processComm'); @@ -102,6 +102,7 @@ function setStatusName(name) { async function readVersion() { const driver = requireEngineDriver(storedConnection); const version = await driver.getVersion(dbhan); + logger.debug(`Got server version: ${version.version}`); process.send({ msgtype: 'version', version }); serverVersion = version; } @@ -113,6 +114,11 @@ async function handleConnect({ connection, structure, globalSettings }) { if (!structure) setStatusName('pending'); const driver = requireEngineDriver(storedConnection); dbhan = await checkedAsyncCall(connectUtility(driver, storedConnection, 'app')); + logger.debug( + `Connected to database, driver: ${storedConnection.engine}, separate schemas: ${ + storedConnection.useSeparateSchemas ? 'YES' : 'NO' + }, 'DB: ${isCompositeDbName(dbhan.database) ? 'composite' : dbhan.database ? 'simple' : 'NO'} }` + ); dbhan.feedback = feedback => setStatus({ feedback }); await checkedAsyncCall(readVersion()); if (structure) {