Recover a deleted field I have a content-type with 4 fields each of which is a term reference. There are 100 nodes each assigned 4 term references. I have accidentally deleted one of these fields from the admin>structure>content-types>mycontent-type...resulting in all 100 nodes losing the term reference this lost field contained.

After installing the Database Admin module I could see that the database for my deleted field was still present, it had been renamed to something like "field_deleted_field_74"


Using mysql I have been able to rename this database back to "field_data_field_originalname" - i.e. using the original machine name for the deleted field
Furthermore I have been able to switch the value of the deleted column inside this database from '1' to '0'.


I have done the above with the other 'ghost' database that I found that was called something like "field_revision_field_74" ...

My problem now is that my renamed field is not appearing as a pre-existing field on my content-type manage fields display nor at admin>reports>fields list.
When I run 'drush field-info fields' it is also missing.

How to I bring it back? I am assuming that there is another database that refers to it that I need to edit. 

Thanks!
A good question, and surprising there's not an easier way to rollback a deleted field, given the data is still available.

Assuming you have:


Renamed the field_deleted_* tables back to field_data_field_myfield and field_revision_field_myfield (latter also important)
Updated the 'deleted' flag from 1 to 0 in the relevant data tables.


There is also 


field_config



  The main field configuration



field_config_instance



  The field configuration on a particular entity bundle.


You may need to adjust the 'deleted' flag there also:

e.g:

UPDATE field_config SET deleted = 0 where field_name = 'field_my_deleted_field';
UPDATE field_config_instance SET deleted = 0 where field_name = 'field_my_deleted_field';
TRUNCATE TABLE cache_field;