fix(db): crear tabla push_subscriptions en PostgreSQL para entorno de produccion

This commit is contained in:
unknown
2026-10-06 01:30:49 -06:00
parent 70700356a7
commit f94fef3041
+11
View File
@@ -134,6 +134,17 @@ function initDatabase() {
creado_en TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
procesado_en TIMESTAMP
);
CREATE TABLE IF NOT EXISTS push_subscriptions (
id SERIAL PRIMARY KEY,
endpoint TEXT UNIQUE NOT NULL,
p256dh TEXT NOT NULL,
auth TEXT NOT NULL,
user_id INTEGER,
rol VARCHAR(50),
escuela_id INTEGER DEFAULT 1,
creado_en TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
`);
} catch (e) {
console.error('Error creando tablas en PostgreSQL:', e);