mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 12:13:57 +00:00
fixes
This commit is contained in:
parent
b30f139b5d
commit
66b39c1f80
@ -70,7 +70,7 @@ describe('Schema tests', () => {
|
|||||||
await driver.query(schemaConn, `create table myschema.myt1 (id int not null primary key)`);
|
await driver.query(schemaConn, `create table myschema.myt1 (id int not null primary key)`);
|
||||||
const structure1 = await driver.analyseFull(schemaConn);
|
const structure1 = await driver.analyseFull(schemaConn);
|
||||||
expect(structure1.tables.length).toEqual(1);
|
expect(structure1.tables.length).toEqual(1);
|
||||||
expect(structure1.tables[0].tableName).toEqual('myt1');
|
expect(structure1.tables[0].pureName).toEqual('myt1');
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -4,7 +4,8 @@ const stream = require('stream');
|
|||||||
const driverBases = require('../frontend/drivers');
|
const driverBases = require('../frontend/drivers');
|
||||||
const Analyser = require('./Analyser');
|
const Analyser = require('./Analyser');
|
||||||
const pg = require('pg');
|
const pg = require('pg');
|
||||||
const { getLogger, createBulkInsertStreamBase, makeUniqueColumnNames } = global.DBGATE_PACKAGES['dbgate-tools'];
|
const { getLogger, createBulkInsertStreamBase, makeUniqueColumnNames, extractDbNameFromComposite } =
|
||||||
|
global.DBGATE_PACKAGES['dbgate-tools'];
|
||||||
|
|
||||||
const logger = getLogger('postreDriver');
|
const logger = getLogger('postreDriver');
|
||||||
|
|
||||||
@ -76,7 +77,7 @@ const drivers = driverBases.map(driverBase => ({
|
|||||||
port: authType == 'socket' ? null : port,
|
port: authType == 'socket' ? null : port,
|
||||||
user,
|
user,
|
||||||
password,
|
password,
|
||||||
database: database || 'postgres',
|
database: extractDbNameFromComposite(database) || 'postgres',
|
||||||
ssl,
|
ssl,
|
||||||
application_name: 'DbGate',
|
application_name: 'DbGate',
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user