bwsamern-ohne_standortplaner/backend/check_geodata_db.js

28 lines
735 B
JavaScript

const { Client } = require('pg');
async function check() {
const client = new Client({
host: '87.106.21.21',
port: 5432,
user: 'enwelo_admin',
password: 'WX1t1cgP1qK09',
database: 'geodata'
});
try {
await client.connect();
const res = await client.query(`
SELECT table_schema, table_name
FROM information_schema.tables
WHERE table_name ILIKE '%wea%';
`);
console.log("Tables with 'wea' in geodata database:");
res.rows.forEach(r => console.log(`${r.table_schema}.${r.table_name}`));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
check();