fix: cleanup query

This commit is contained in:
unknown
2026-10-05 07:21:40 -06:00
parent 1694606cdb
commit 52d4f0b6e0
+1 -1
View File
@@ -3,7 +3,7 @@ const { Client } = require('pg');
async function clean() { async function clean() {
const client = new Client({ connectionString: 'postgresql://postgres:[email protected]:5432/recreopay_db' }); const client = new Client({ connectionString: 'postgresql://postgres:[email protected]:5432/recreopay_db' });
await client.connect(); await client.connect();
await client.query("DELETE FROM transacciones_saldo WHERE motivo = 'test PIN correcto' OR descripcion LIKE '%test PIN correcto%'"); await client.query("DELETE FROM transacciones_saldo WHERE descripcion LIKE '%test PIN correcto%'");
await client.query('UPDATE estudiantes SET saldo_colones = 4500 WHERE id = 2'); await client.query('UPDATE estudiantes SET saldo_colones = 4500 WHERE id = 2');
await client.query('UPDATE estudiantes SET saldo_colones = 1500 WHERE id = 1'); await client.query('UPDATE estudiantes SET saldo_colones = 1500 WHERE id = 1');
const res = await client.query('SELECT id, nombre_completo, saldo_colones FROM estudiantes WHERE id IN (1, 2) ORDER BY id'); const res = await client.query('SELECT id, nombre_completo, saldo_colones FROM estudiantes WHERE id IN (1, 2) ORDER BY id');