mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 03:16:01 +00:00
import from postgres dump
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
"devDependencies": {
|
||||
"antares-mysql-dumper": "^0.0.1",
|
||||
"dbgate-plugin-tools": "^1.0.7",
|
||||
"dbgate-query-splitter": "^4.10.4",
|
||||
"dbgate-query-splitter": "^4.10.5",
|
||||
"dbgate-tools": "^5.0.0-alpha.1",
|
||||
"mysql2": "^3.11.0",
|
||||
"webpack": "^5.91.0",
|
||||
|
||||
@@ -52,7 +52,7 @@ const drivers = driverBases.map(driverBase => ({
|
||||
const dbhan = {
|
||||
client,
|
||||
database,
|
||||
}
|
||||
};
|
||||
if (isReadOnly) {
|
||||
await this.query(dbhan, 'SET SESSION TRANSACTION READ ONLY');
|
||||
}
|
||||
@@ -69,7 +69,11 @@ const drivers = driverBases.map(driverBase => ({
|
||||
};
|
||||
}
|
||||
|
||||
if (options?.importSqlDump && sql.trim().startsWith('/*!') && sql.includes('character_set_client')) {
|
||||
if (
|
||||
options?.importSqlDump &&
|
||||
(sql.trim().startsWith('/*!') || sql.trim().startsWith('/*M!')) &&
|
||||
(sql.includes('character_set_client') || sql.includes('NOTE_VERBOSITY'))
|
||||
) {
|
||||
// skip this in SQL dumps
|
||||
return {
|
||||
rows: [],
|
||||
|
||||
Reference in New Issue
Block a user