Files
Pay2Gateway/check_schema.js

17 lines
431 B
JavaScript

const { Client } = require('pg');
const client = new Client({ connectionString: process.env.DATABASE_URL });
async function checkSchema() {
await client.connect();
const res = await client.query(`
SELECT column_name, data_type
FROM information_schema.columns
WHERE table_name = 'transactions'
`);
console.log(JSON.stringify(res.rows, null, 2));
await client.end();
}
checkSchema();