24 lines
625 B
JavaScript
24 lines
625 B
JavaScript
const { Client } = require('pg');
|
|
|
|
async function check() {
|
|
require('dotenv').config({ path: '../.env' });
|
|
const client = new Client({
|
|
host: process.env.DB_HOST,
|
|
port: process.env.DB_PORT,
|
|
user: process.env.DB_USER,
|
|
password: process.env.DB_PASSWORD,
|
|
database: process.env.DB_NAME
|
|
});
|
|
|
|
try {
|
|
await client.connect();
|
|
await client.query("UPDATE geodaten.wea_standorte SET ksf_drehung = 45 WHERE wea_nummer = 'TEST-2'");
|
|
console.log('Updated TEST-2 rotation to 45');
|
|
} catch (e) {
|
|
console.error(e);
|
|
} finally {
|
|
await client.end();
|
|
}
|
|
}
|
|
check();
|