I'm trying to use features to deploy some changes from a local development site to a staging site on a seperate server, the problem is that I've got an existing content type on my dev and staging environment, let's call it hero_feature.
Here is an example breakdown of the fields that exist in this content type on both dev and staging:
Dev
- Hero Type (Machine Name: field_hero_type)
- Main Image
- Main Title
- Sub Title
Staging
- Main Image
- Main Title
- Sub Title
So there's a field on my dev environment (Hero Type) that I want to transfer from Dev to Staging using features. I'm not sure if it's significant but it's a text select widget.
I've tried creating the feature in a number of ways (selecting the content type itself in one instance, and only the fields that need transferring in another) but every time I get the same error message, which is something like:
DatabaseSchemaObjectExistsException: Table field_data_field_hero_type already exists. in DatabaseSchema->createTable() (line 657 of /sites/drupal/includes/database/schema.inc).
Which I understand is because the code is trying to create the content type for the field when it already exists.
This is really starting to drive me crazy.
Is it possible to do something like this with Drupal features? Or should I have featurised this before initially deploying to staging in the first place?
(I realise that in my example I could rather easily replicate the changes manually on the staging site, but in reality I have a number of fields and other changes that need porting over to the Staging site, and I'm not happy with manually making these changes everytime something like this needs deploying.)