Skip to content

Table Entry Already Exist

If for some reason you get an SQL error with Drupal regarding a table field entry already existing when migrating over to a new theme, please drop the field_data_field entry using the following drush commands:

  1. SSH into development server
  2. use the following command to access website database: cd  /var/www/drupal7-prod/htdocs/sites/WEBSITE_URL
  3. drush sql-query "DROP TABLE field_data_field_fieldname"
  4. drush sql-query "DROP TABLE field_revision_field_fieldname"
  5. drush cc all

The entry "field_data_field" might need to change depending on the error, but unlikely.