Initial commit - Dutchie dispensary scraper

This commit is contained in:
Kelly
2025-11-28 19:45:44 -07:00
commit 5757a8e9bd
23375 changed files with 3788799 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
import { Pool } from 'pg';
const pool = new Pool({
connectionString: 'postgresql://sail:password@localhost:5432/dutchie_menus'
});
async function addLocationColumns() {
try {
console.log('Adding location columns to proxies table...\n');
await pool.query(`
ALTER TABLE proxies
ADD COLUMN IF NOT EXISTS city VARCHAR(100),
ADD COLUMN IF NOT EXISTS state VARCHAR(100),
ADD COLUMN IF NOT EXISTS country VARCHAR(100),
ADD COLUMN IF NOT EXISTS country_code VARCHAR(10),
ADD COLUMN IF NOT EXISTS latitude DECIMAL(10, 8),
ADD COLUMN IF NOT EXISTS longitude DECIMAL(11, 8)
`);
console.log('✅ Location columns added successfully\n');
// Show updated schema
const result = await pool.query(`
SELECT column_name, data_type
FROM information_schema.columns
WHERE table_name = 'proxies'
ORDER BY ordinal_position
`);
console.log('Updated proxies table schema:');
console.log('─'.repeat(60));
result.rows.forEach(row => {
console.log(` ${row.column_name}: ${row.data_type}`);
});
console.log('─'.repeat(60));
} catch (error: any) {
console.error('Error:', error.message);
} finally {
await pool.end();
}
}
addLocationColumns();