These are chat archives for collectiveaccess/support
another question please. So I previously created some meta elements and have assigned them to ca-objects. I then imported data into these new elements. On the same import, data was also going to ca-storage- locations (using storageLocationHeirarchyBuilder) and ca-loans (via loanSplitter).
But now that I know more of CA, this is not what I wanted. I want to reimport the same data/spreadsheet but going to ca-movements instead of ca-objects. There is still data going to ca-storage-locations and ca-loans.
--I am concern on how to delete previously imported data.-- How can I clean/reset the ca-storage-locations/ca-loans "tables"? How about the meta elements that I created myself? How do I reset this? My best guess is to just delete it and recreate again.
thank you so much
@mrjayviper It's either export profile, reinstall CA with new profile, re-import all the data or find some way to delete all the objects / relationships. Depending on your sql fu, you can do something as simple as
# Note this will mark all of your objects as deleted UPDATE ca_objects SET deleted = 1 WHERE deleted = 0; # Note this will delete the join to the storage locations DELETE from ca_objects_x_storage_locations;
Alternatively you can use the web services to do deletes given a list of object ids. This will keep the search index up to date.
However both of these methods will leave you with orphan values in
ca_attributes as a minimum, and also probably in the various
UPDATE ca_loans SET deleted = 1;as well.
the question is too long to ask here so I decided to create a forum post: http://www.collectiveaccess.org/support/forum/index.php?p=/discussion/295236/question-issues-on-data-import
hope it's clear. thanks again!