You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
senzapaura_es/scripts/estudio/actualizar-personas.mjs

16 lines
380 B

import pg from 'pg';
import { migrarPersonas } from './personas.mjs';
const c = new pg.Client({ connectionString: process.env.DATABASE_URL });
await c.connect();
try {
await c.query('BEGIN');
console.log(await migrarPersonas(c));
await c.query('COMMIT');
} catch (e) {
await c.query('ROLLBACK');
console.error(e.message);
process.exitCode = 1;
} finally {
await c.end();
}

Powered by TurnKey Linux.