Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting the db to avoid id collisions #161

Open
laem opened this issue May 12, 2024 · 3 comments
Open

Deleting the db to avoid id collisions #161

laem opened this issue May 12, 2024 · 3 comments

Comments

@laem
Copy link

laem commented May 12, 2024

Hi, I was confronted with a weird problem : while analysing routes for their frequency, I got strange results : a suppposedly school bus was apparently running on sundays.

Turns out, it was a db update problem : the GTFS I was loading every day was updated reusing serviceIds that were used by totally different routes.

My simple solution is to delete the DB. Maybe this could be a feature ?

Right now, I'm calling the DB "2024-05-12-11-14" (day hour minutes) and removing them after a successful update.

@brendannee
Copy link
Member

brendannee commented May 12, 2024 via email

@laem
Copy link
Author

laem commented May 12, 2024

Not really, because I want to store the database in the filesystem to avoid reparsing the GTFS if the server crashes (or in dev mode, when I restart my server after a change).

@brendannee
Copy link
Member

Check out the latest version https://github.com/BlinkTagInc/node-gtfs/releases/tag/4.10.3 - I added a deleteDb method: https://github.com/BlinkTagInc/node-gtfs?tab=readme-ov-file#deleting-a-database

Let me know if this doesn't work for your use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants