25 lines
576 B
TypeScript
25 lines
576 B
TypeScript
import { pool } from './src/db/migrate';
|
|
|
|
async function checkStores() {
|
|
try {
|
|
const result = await pool.query(`
|
|
SELECT id, name, slug, dutchie_url
|
|
FROM stores
|
|
WHERE name ILIKE '%sol flower%'
|
|
ORDER BY name
|
|
`);
|
|
|
|
console.log(`Found ${result.rows.length} Sol Flower stores:\n`);
|
|
result.rows.forEach(store => {
|
|
console.log(`ID ${store.id}: ${store.name}`);
|
|
console.log(` URL: ${store.dutchie_url}\n`);
|
|
});
|
|
} catch (error) {
|
|
console.error('Error:', error);
|
|
} finally {
|
|
await pool.end();
|
|
}
|
|
}
|
|
|
|
checkStores();
|