fix: make Freileitungen globally accessible again
Deploy Standortplaner / deploy (push) Successful in 17s Details

This commit is contained in:
Johannes Baumeister 2026-07-05 20:34:32 +02:00
parent 57623eee3c
commit cf12184948
2 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,23 @@
require('dotenv').config({ override: true });
const { Pool } = require('pg');
const pool = new Pool({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
database: process.env.DB_NAME,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD
});
async function run() {
try {
await pool.query('ALTER TABLE geodaten."Freileitungen" DROP COLUMN IF EXISTS projekt_id;');
console.log('Dropped projekt_id from Freileitungen');
} catch(e) {
console.error(e);
} finally {
pool.end();
}
}
run();

View File

@ -734,7 +734,6 @@ app.get('/api/layers/leitungsverlaeufe', async (req, res) => {
) )
) AS feature ) AS feature
FROM geodaten."Freileitungen" FROM geodaten."Freileitungen"
WHERE projekt_id = $1
) features`, ) features`,
[projId] [projId]
); );