postgre fix

This commit is contained in:
Jan Prochazka
2022-06-12 07:30:44 +02:00
parent 42200ec04a
commit 6794b79d0e

View File

@@ -162,14 +162,14 @@ class Analyser extends DatabaseAnalyser {
const uniqueNames = await this.driver.query(this.pool, this.createQuery('uniqueNames', ['tables'])); const uniqueNames = await this.driver.query(this.pool, this.createQuery('uniqueNames', ['tables']));
let geometryColumns = { rows: [] }; let geometryColumns = { rows: [] };
if (views.rows.find(x => (x.pure_name = 'geometry_columns' && x.schema_name == 'public'))) { if (views.rows.find(x => x.pure_name == 'geometry_columns' && x.schema_name == 'public')) {
this.feedback({ analysingMessage: 'Loading geometry columns' }); this.feedback({ analysingMessage: 'Loading geometry columns' });
geometryColumns = await this.driver.query(this.pool, this.createQuery('geometryColumns', ['tables'])); geometryColumns = await this.safeQuery(this.createQuery('geometryColumns', ['tables']));
} }
let geographyColumns = { rows: [] }; let geographyColumns = { rows: [] };
if (views.rows.find(x => (x.pure_name = 'geography_columns' && x.schema_name == 'public'))) { if (views.rows.find(x => x.pure_name == 'geography_columns' && x.schema_name == 'public')) {
this.feedback({ analysingMessage: 'Loading geography columns' }); this.feedback({ analysingMessage: 'Loading geography columns' });
geographyColumns = await this.driver.query(this.pool, this.createQuery('geographyColumns', ['tables'])); geographyColumns = await this.safeQuery(this.createQuery('geographyColumns', ['tables']));
} }
this.feedback({ analysingMessage: 'Finalizing DB structure' }); this.feedback({ analysingMessage: 'Finalizing DB structure' });