There was an error while loading. Please reload this page.
1 parent 2acd772 commit f2471feCopy full SHA for f2471fe
1 file changed
web/test-db.js
@@ -0,0 +1,18 @@
1
+const { Client } = require('pg');
2
+
3
+async function checkTables() {
4
+ const connectionString = "postgresql://neondb_owner:npg_yiB8ARS9mdVz@ep-withered-sun-ahfl7pwa-pooler.c-3.us-east-1.aws.neon.tech/neondb?sslmode=require";
5
+ const client = new Client({ connectionString });
6
7
+ try {
8
+ await client.connect();
9
+ const res = await client.query("SELECT table_name FROM information_schema.tables WHERE table_schema='public';");
10
+ console.log('Tables found in Sage Vyasa DB:', res.rows.map(r => r.table_name));
11
+ await client.end();
12
+ } catch (err) {
13
+ console.error('Connection error:', err);
14
+ process.exit(1);
15
+ }
16
+}
17
18
+checkTables();
0 commit comments