Can you try these and let me know if you get any errors?
DROP INDEX `idx_uni` ON `perch2_resource_log`;
ALTER IGNORE TABLE `perch2_resource_log` ADD UNIQUE INDEX `idx_uni` (`appID`, `itemFK`, `itemRowID`, `resourceID`);
It feels like Perch has another reference to these unused resources elsewhere in it's database. Perhaps my manual overwriting of the resources table is under the radar so to speak, hence it getting deleted upon saving.
Can you try these and let me know if you get any errors?
No errors for either query
Does
perch2_resource_log
now show a UNIQUE key for indexidx_uni
?Yes (i think).... this is the line in 'create syntax' from Sequel Pro
UNIQUE KEY
idx_uni
(appID
,itemFK
,itemRowID
,resourceID
),Ok, that looks a lot better. It should have been fixed when you updated to 2.7.8, which is a bit confusing.
I didn't update to 2.7.8 that would be why. Sorry
When I read the update log it didn't seem like the fixes were relevant to this.
I'll update now.
Hi Drew
I have updated and am still getting a problem with this resources table getting rewritten.
I have had to import directly to the resources table since upgrading. The file that I used to upload to that table is here:
https://www.dropbox.com/s/7xlzccqzokkgfyd/localhost-decluttermetest-23-01-2015-17-25-resourcestable-merged.csv?dl=0
Could this process of importing the table have a part to play in this problem?
Unused resources will be removed when you save. Are you saying that resources that are in use are being removed?
Yes. Exactly.
It feels like Perch has another reference to these unused resources elsewhere in it's database. Perhaps my manual overwriting of the resources table is under the radar so to speak, hence it getting deleted upon saving.
You're overriding the entire database, not just resources, correct?