Files
Gov_Travel_App/scripts/updateRiga.js
mblanke ae1f13d69e 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.
2026-01-13 11:32:49 -05:00

42 lines
1.0 KiB
JavaScript

const db = require("../services/databaseService");
async function updateRigaRate() {
await db.connect();
return new Promise((resolve, reject) => {
db.db.run(
`
UPDATE travel_rates
SET jan_accommodation = 209,
feb_accommodation = 209,
mar_accommodation = 209,
apr_accommodation = 209,
may_accommodation = 209,
jun_accommodation = 209,
jul_accommodation = 209,
aug_accommodation = 209,
sep_accommodation = 209,
oct_accommodation = 209,
nov_accommodation = 209,
dec_accommodation = 209,
standard_accommodation = 209,
currency = 'CAD'
WHERE LOWER(city_name) = 'riga'
`,
[],
(err) => {
if (err) {
console.error("❌ Error:", err);
reject(err);
} else {
console.log("✅ Riga accommodation updated to CAD $209");
resolve();
}
db.close();
}
);
});
}
updateRigaRate().catch(console.error);