Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
JKW  
#1 Posted : Tuesday, December 12, 2023 10:11:51 AM(UTC)
JKW
Rank: Advanced Member

Reputation:

Groups: Registered
Posts: 79

Had historic Samples and Locations with Monitoring Rounds.

Some of the Locations are duplicates with others LocCodes with variations on names  and now need to be deleted. 

Normally this is work that takes a few minutes. 

However, I discover that the inclusion of Monitoring Rounds for the historic 3rd party data - has gone and created a large number of Location_Visits. There is no CASCADE on Location Visits if you delete the Location so you need to go delete the Location_Visit first. 

However deleting these records is taking a very long amount of time - turning what should be a few minutes of clean up into hours of waiting. Have attempted to delete from both the Web GUI and now the SQL backend.  Is there a way to avoid Location_Visits being created with historic Data?  Or speed up the deletetion process?

Warwick Wood  
#2 Posted : Tuesday, December 12, 2023 4:24:40 PM(UTC)
Warwick Wood
Rank: Administration

Reputation:

Groups: Registered, Administrators
Posts: 498
Man
Location: Byron Bay

Was thanked: 19 time(s) in 19 post(s)

Hi Justin,

Normally you can't delete a Location if it has child data (Such as Chemistry Samples or Location Visits), you need to delete the child data first.  This prevents the potential accidental deletion of large volumes of data when deleting a Location.

The best way to merge two locations is to use the "Reject" option in the Locations Portal (or under Site - Locations).   This is designed to address the exact scenario you have encountered, and will reassign the data from the duplicate location to the correct location and delete the duplicate Location Code.    Have a look under "Accept/Reject" at https://help.ESdat.net/en/article/locations

Regards,

Warwick

ps. Location Visits will only be created on a Historical Data import if they are specifically imported, they aren't created by any kind of automated process.

Edited by user Tuesday, December 12, 2023 4:25:54 PM(UTC)  | Reason: Not specified

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.