25 lines
509 B
TypeScript
25 lines
509 B
TypeScript
import { pool } from './src/db/migrate';
|
|
|
|
async function verify() {
|
|
try {
|
|
const result = await pool.query(`
|
|
SELECT id, name, slug
|
|
FROM categories
|
|
WHERE store_id = 18
|
|
ORDER BY id
|
|
`);
|
|
|
|
console.log(`Found ${result.rows.length} categories for store 18:`);
|
|
result.rows.forEach(cat => {
|
|
console.log(` ${cat.id}: ${cat.name} (${cat.slug})`);
|
|
});
|
|
|
|
await pool.end();
|
|
} catch (error) {
|
|
console.error('Error:', error);
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
verify();
|