qgis-midvatten-plugin
qgis-midvatten-plugin copied to clipboard
"Check database"-feature
It would be good to have a feature that checks the database for common "issues". It might be even more useful if we use a normalized data structure for the 2.0 version. The feature should run several tests/checks and create a report with the findings. The feature should probably not alter anything in the database, only make suggestions on corrections to be made.
The test could include (add to this list):
All version:
- Duplicate date_times (ex '2019-01-01 00:00 vs 2019-01-01 00:00:00).
- Duplicate measurements with different date_times due to time zones. (Ex: Same value, but date_times 1 hour apart).
- Obsids where two of three of h_toc, h_gs and h_tocags exists but the third is missing (the third should be calculated from the other two).
Midv2.0:
- Get all foreign keys that are not used. Ex: locations without objects, unused citations etc.
- Missing citations. Ex message: "5 objects are missing citations".