Day 2 begins! Day 1 notes here
https://technonaturalist.net/blog/2011/01/drupal-7-notes-dealing-ghost-fields
https://technonaturalist.net/comment/reply/43/1223 -- Comment from Jen Lampton Nov 2013 Running cron once doesn’t always do the trick. If it doesn’t work the first time, you may need to run cron 10 or 20 times to get the fields to actually be deleted. Its faster to just manually delete the two tables (field_data and field_revision) as well as the two records from field_instance and field_instance_config. Still not resolved as of the latest version of D7.
https://drupal.org/comment/5865292#comment-5865292
- Delete the records from field_config / field_config_instance
Here goes the test. Switched to dev branch, and added an install hook to remove the field.
Running the install hook:
I expected that. Let's look at the actual field_partners table.
It exists, and all the "deleted" values are set to 1. Still only 10 field_deleted tables.
Let's take a look at the node 589 now. Ok, there's no more field_partners in the array. That's promising.
^^ What's interesting here is that all the field_config records have deleted = 0.
^^ In INSTANCE, field_partners.deleted = 1 but all of the other guys have deleted = 0.
Once you delete a field collection instance, you aren't able to delete the rest of the fields in it. My bet is that deleting the field collection won't be deleting its child fields, resulting in orphans... sad :(
Creating a new node, and works fine. No record inserted into field_partners.
Let's try to see what field_purge_batch does, if we still get the "cannot rename table" error.
it completes with no errors. We still have a field_data_field partners with all deleted values=1 and 10 revision tables. Nothing changed.
Beginning to think may need to delete all child fields first and then attempt to delete field_partners, AFTER first manually dropping all of the field_deleted _ tabesl