feat: add scripts for database inspection and migration

- Implemented multiple scripts to check and inspect meal plans, scraped data, and accommodations for Munich and Riga.
- Added a migration script to convert scraped data into the application's database format.
- Introduced new database service methods for querying and updating travel rates.
- Enhanced server configuration for serving static files in production.
- Updated PostCSS configuration for consistency.
This commit is contained in:
2026-01-13 11:32:49 -05:00
parent 4d915aa3ea
commit ae1f13d69e
21 changed files with 1012 additions and 265 deletions

View File

@@ -264,29 +264,30 @@ async function generateFlights(originCode, destCode, departureDate) {
selectedAirlines.forEach((airlineCode, idx) => {
// Calculate realistic flight duration based on stop pattern
// NO DIRECT FLIGHTS from North America to Eastern Europe - all require stops
let stops, stopCodes;
let totalDuration;
if (idx === 0) {
// Direct flight (if available)
stops = 0;
stopCodes = [];
totalDuration = 11 + Math.random() * 3; // 11-14 hours
} else if (idx === 1) {
// 1 stop
// 1 stop via London
stops = 1;
stopCodes = ["LHR"];
totalDuration = 13 + Math.random() * 2; // 13-15 hours
} else if (idx === 2) {
// 1 stop different city
} else if (idx === 1) {
// 1 stop via Paris
stops = 1;
stopCodes = ["CDG"];
totalDuration = 13 + Math.random() * 2;
totalDuration = 13 + Math.random() * 2; // 13-15 hours
} else if (idx === 2) {
// 1 stop via Frankfurt
stops = 1;
stopCodes = ["FRA"];
totalDuration = 14 + Math.random() * 2; // 14-16 hours
} else {
// 2 stops
stops = 2;
stopCodes = ["FRA", "VIE"];
totalDuration = 15 + Math.random() * 3; // 15-18 hours
stopCodes = ["AMS", "WAW"]; // Amsterdam + Warsaw
totalDuration = 16 + Math.random() * 2; // 16-18 hours
}
// Generate realistic departure times (6am-10am)