1

I recently inherited a Drupal site and while trying to migrate the site and DB I noticed that the DB is 1GB+ and had 1000s of tables. This is the first time i work with Drupal so I'm not sure what these tables are.

enter image description here

A lot of them are exactly 128KB and named something like drupal_field_data_style_abc or drupal_field_revision_abc. Is it safe to delete these? Not really sure what they are for at the moment.

3

Those tables are tables for fields. Whenever you add a field to a content type Drupal creates two tables, one to store the field value and another one to store historical data of that field.

Deleting those table will break your site.

This just means that you have a lot of fields. Usually, in drupal 7 it is a watchdog table that contributes to the size of your database unless you want to keep historical log data feel free to clear some data from watchdog table.

1

As @hunde already mentioned that Drupal stores fields data in two type of tables one is field_data_[field_name] and field_revision_[field_name].

However its not the best practice to remove the tables directly from database, it can break the site. Because the tables are related with the [field_name] and [field_name] is stored in field_config and field_config_instance tables.

It is best to delete the field from admin panel only in case the field is not used anywhere on the site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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