From fea1f2d270cc344fa7f3cc1aa7f02373eab12b36 Mon Sep 17 00:00:00 2001 From: marsalva Date: Sat, 7 Mar 2026 16:18:36 +0000 Subject: [PATCH] Actualizar server.js --- server.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/server.js b/server.js index 380eda1..a31af67 100644 --- a/server.js +++ b/server.js @@ -249,7 +249,7 @@ async function autoUpdateDB() { created_at TIMESTAMP DEFAULT NOW() ); - -- TABLA PARA ASIGNACIÓN AUTOMÁTICA +-- TABLA PARA ASIGNACIÓN AUTOMÁTICA CREATE TABLE IF NOT EXISTS assignment_pings ( id SERIAL PRIMARY KEY, scraped_id INT NOT NULL, @@ -260,7 +260,7 @@ async function autoUpdateDB() { created_at TIMESTAMP DEFAULT NOW() ); - -- 💬 CHAT Y NOTAS INTERNAS (TIPO iTRAMIT) + -- 💬 CHAT Y NOTAS INTERNAS CREATE TABLE IF NOT EXISTS service_communications ( id SERIAL PRIMARY KEY, scraped_id INT REFERENCES scraped_services(id) ON DELETE CASCADE, @@ -272,7 +272,11 @@ async function autoUpdateDB() { is_internal BOOLEAN DEFAULT FALSE, created_at TIMESTAMP DEFAULT NOW() ); - `); + `); + + // PARCHE DE ACTUALIZACIÓN + await client.query(` + DO $$ BEGIN -- TABLA PARA ASIGNACIÓN AUTOMÁTICA CREATE TABLE IF NOT EXISTS assignment_pings (