bwsamern-ohne_standortplaner/backend/check_old_alkis.js

28 lines
763 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: 'enwelo'
});
try {
await client.connect();
const res = await client.query(`
SELECT column_name, data_type
FROM information_schema.columns
WHERE table_schema = 'geodaten' AND table_name = 'flaecheneigentuemer_alkis2'
`);
console.log("Columns in geodaten.flaecheneigentuemer_alkis2:");
console.log(res.rows.map(r => r.column_name).join(', '));
} catch (e) {
console.error(e);
} finally {
await client.end();
}
}
check();