
const { Sequelize } = require('sequelize');

const sequelize = new Sequelize(
  'db_greenhouse_trials_tracker',
  'postgres',
  '',
  {
    host: 'localhost', // or process.env.DB_HOST which is 127.0.0.1
    dialect: 'postgres',
    logging: false,
  }
);

async function check() {
  try {
    const [results, metadata] = await sequelize.query("SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'");
    console.log('Tables:', results);
  } catch (err) {
    console.error('Error:', err);
  } finally {
    await sequelize.close();
  }
}

check();
