13 lines
330 B
JavaScript
13 lines
330 B
JavaScript
import 'dotenv/config';
|
|
import { pool } from './db.js';
|
|
|
|
console.log('Connecting to database...');
|
|
try {
|
|
await pool.query('TRUNCATE TABLE banners CASCADE;');
|
|
console.log('SUCCESS: Banners table cleared successfully.');
|
|
} catch (err) {
|
|
console.error('ERROR clearing banners:', err.message);
|
|
} finally {
|
|
await pool.end();
|
|
}
|