
const { Sequelize } = require('sequelize');
require('dotenv').config();

const sequelize = new Sequelize(
  process.env.DB_NAME, // app_38460
  process.env.DB_USER,
  process.env.DB_PASS,
  {
    host: process.env.DB_HOST,
    port: process.env.DB_PORT,
    dialect: 'postgres',
    logging: false,
  }
);

async function reset() {
  try {
    await sequelize.query('TRUNCATE TABLE "SequelizeMeta"');
    console.log('SequelizeMeta truncated.');
  } catch (err) {
    console.error('Error:', err);
  } finally {
    await sequelize.close();
  }
}

reset();
