Initial commit

This commit is contained in:
2025-12-08 12:12:07 +07:00
commit 0b2e8c4c16
1238 changed files with 160253 additions and 0 deletions

28
server/check_tables.js Normal file
View File

@@ -0,0 +1,28 @@
require('dotenv').config();
const { Client } = require('pg');
const client = new Client({
host: process.env.DB_HOST,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME,
port: process.env.DB_PORT,
});
(async () => {
try {
await client.connect();
console.log('Listing tables in database...');
const res = await client.query(`
SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
ORDER BY table_name;
`);
console.log(res.rows.map(r => r.table_name));
await client.end();
} catch (err) {
console.error(err);
process.exit(1);
}
})();