Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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"

  1. 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
  2. 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.


share|improve this question
Do you have any backups of the whole database before you deleted the fields? – Ollie Mar 24 '14 at 21:20
Unfortunately not. I did however solve the problem. – iain maitland Mar 24 '14 at 21:48
up vote 13 down vote accepted

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:

  1. Renamed the field_deleted_* tables back to field_data_field_myfield and field_revision_field_myfield (latter also important)
  2. 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:


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;
share|improve this answer
Thank you for the quick response. Editing both the field_config and field_config_instance databases did the trick. – iain maitland Mar 24 '14 at 21:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.