← back to Costa Rica
scripts/seed.sql
59 lines
-- Seed CR regions (provinces + tourism cantones/towns)
-- Multi-vertical directory: tourism + rentals + local services
INSERT INTO regions (slug, name, province, region_type, lat, lng, description) VALUES
('san-jose', 'San José', 'San José', 'city', 9.9281, -84.0907, 'Capital. Business + cultural hub.'),
('escazu', 'Escazú', 'San José', 'town', 9.9189, -84.1395, 'Affluent suburb west of San José.'),
('santa-ana', 'Santa Ana', 'San José', 'town', 9.9325, -84.1843, 'Suburban / corporate west of San José.'),
('alajuela', 'Alajuela', 'Alajuela', 'city', 10.0162, -84.2117, 'SJO airport hub.'),
('atenas', 'Atenas', 'Alajuela', 'town', 9.9783, -84.3754, 'Coffee + retiree-favored climate.'),
('grecia', 'Grecia', 'Alajuela', 'town', 10.0717, -84.3148, 'Highland coffee town.'),
('la-fortuna', 'La Fortuna / Arenal','Alajuela', 'town', 10.4673, -84.6435, 'Volcano Arenal — adventure tourism.'),
('heredia', 'Heredia', 'Heredia', 'city', 10.0023, -84.1162, 'Coffee + university.'),
('cartago', 'Cartago', 'Cartago', 'city', 9.8638, -83.9203, 'Former colonial capital.'),
('liberia', 'Liberia', 'Guanacaste', 'city', 10.6333, -85.4382, 'Northwest gateway, LIR airport.'),
('tamarindo', 'Tamarindo', 'Guanacaste', 'town', 10.2992, -85.8401, 'Pacific surf town.'),
('nosara', 'Nosara', 'Guanacaste', 'town', 9.9744, -85.6512, 'Yoga + surf + wellness.'),
('santa-teresa', 'Santa Teresa', 'Puntarenas', 'town', 9.6411, -85.1711, 'Surf + wellness on Nicoya tip.'),
('montezuma', 'Montezuma', 'Puntarenas', 'town', 9.6553, -85.0717, 'Bohemian Nicoya village.'),
('jaco', 'Jacó', 'Puntarenas', 'town', 9.6189, -84.6285, 'Central Pacific surf + nightlife.'),
('manuel-antonio', 'Manuel Antonio', 'Puntarenas', 'town', 9.3919, -84.1374, 'National park + beach.'),
('quepos', 'Quepos', 'Puntarenas', 'town', 9.4329, -84.1612, 'Sportfishing + Manuel Antonio gateway.'),
('uvita', 'Uvita', 'Puntarenas', 'town', 9.1622, -83.7472, 'Whale tail + Marino Ballena.'),
('dominical', 'Dominical', 'Puntarenas', 'town', 9.2536, -83.8569, 'Surf town between Uvita + Quepos.'),
('puerto-viejo', 'Puerto Viejo', 'Limón', 'town', 9.6552, -82.7551, 'Caribbean + reggae + reef.'),
('cahuita', 'Cahuita', 'Limón', 'town', 9.7406, -82.8419, 'Caribbean national park town.'),
('monteverde', 'Monteverde', 'Puntarenas', 'town', 10.3009, -84.8259, 'Cloud forest + zip-lines.'),
('santa-elena', 'Santa Elena', 'Puntarenas', 'town', 10.3198, -84.8253, 'Monteverde gateway.'),
('limon', 'Limón', 'Limón', 'city', 9.9907, -83.0359, 'Caribbean port city.'),
('puntarenas', 'Puntarenas', 'Puntarenas', 'city', 9.9762, -84.8384, 'Pacific port + ferry to Nicoya.'),
('papagayo', 'Península Papagayo', 'Guanacaste', 'town', 10.6276, -85.6775, 'Luxury resort enclave.'),
('playas-coco', 'Playas del Coco', 'Guanacaste', 'town', 10.5532, -85.6996, 'Diving + nightlife on Gulf of Papagayo.'),
('flamingo', 'Playa Flamingo', 'Guanacaste', 'town', 10.4338, -85.7833, 'White-sand beach + sportfishing.'),
('samara', 'Sámara', 'Guanacaste', 'town', 9.8814, -85.5295, 'Family-friendly Nicoya beach.'),
('nicoya', 'Nicoya', 'Guanacaste', 'city', 10.1487, -85.4525, 'Blue-zone hub + cantón seat.'),
('guanacaste-other', 'Guanacaste — other', 'Guanacaste', 'region', 10.4500, -85.6000, 'Other Guanacaste locations.'),
('puntarenas-other', 'Puntarenas — other', 'Puntarenas', 'region', 9.6000, -84.5000, 'Other Puntarenas locations.'),
('cr-other', 'Costa Rica — other', 'CR', 'region', 10.0000, -84.0000, 'Unassigned.')
ON CONFLICT (slug) DO NOTHING;
-- Demo places (placeholders so UI renders something before scrape lands real data)
INSERT INTO places (slug, name, category, vertical, region_id, description, address, source) VALUES
('nosara-yoga-institute', 'Nosara Yoga Institute', 'tourism', 'tourism_tour',
(SELECT id FROM regions WHERE slug='nosara'),
'Yoga teacher training + retreats above Playa Guiones.',
'Playa Guiones, Nosara', 'seed-demo'),
('tamarindo-surf-school', 'Tamarindo Surf School', 'tourism', 'tourism_surf',
(SELECT id FROM regions WHERE slug='tamarindo'),
'Beginner-to-advanced surf lessons on Playa Tamarindo.',
'Playa Tamarindo, Tamarindo', 'seed-demo'),
('arenal-volcano-tour', 'Arenal Volcano Hike', 'tourism', 'tourism_tour',
(SELECT id FROM regions WHERE slug='la-fortuna'),
'Guided lava-flow hike at Arenal National Park.',
'Parque Nacional Arenal, La Fortuna', 'seed-demo'),
('manuel-antonio-rental', 'Casa Manuel Antonio', 'rentals', 'rentals_short',
(SELECT id FROM regions WHERE slug='manuel-antonio'),
'Three-bedroom ocean-view villa near Manuel Antonio.',
'Manuel Antonio', 'seed-demo')
ON CONFLICT (slug) DO NOTHING;