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

Improve re-running the merger #27

Open
stefanpernpaintner opened this issue Jul 10, 2023 · 2 comments
Open

Improve re-running the merger #27

stefanpernpaintner opened this issue Jul 10, 2023 · 2 comments

Comments

@stefanpernpaintner
Copy link
Collaborator

stefanpernpaintner commented Jul 10, 2023

Currently when re-running the merger one has to basically throw away the db and has to recreate it. A more convenient way is to persist merged stations isolated from the imported data and only delete the according table.
Further ideas:

  • this makes the flag in the stations table redundant that shows the merge status hence this can also be deleted.
  • The info of MergedStationSource can be stored in the new merged_stations table and MergedStationSource entity and table can be removed
@LarsHaferkampEON
Copy link
Contributor

Current workaround (includes adding is_merged flag to address and charging table).
After deleting the entries the merger can run again

  delete from echarm_merged_station_source ;
   delete from echarm_charging a where a.is_merged=true;
   delete from echarm_address a where a.is_merged=true;
   delete from echarm_stations es where es.is_merged=true ;
   update echarm_stations SET merge_status = null;

@LarsHaferkampEON
Copy link
Contributor

For now implemented a new option (delete_data), which performs the actions above, will create a PR

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