Consider the following scenario:
- a dev site where work is actually done
- a prod site
To move a feature from dev to prod, one needs to
(1) Recreate the feature on the dev site (or use drush feature-update)
(2) put the resulting feature instead of the previous one in modules/features/ (on the the local dev site)
(3) sync the local modules/features/* folder with the remote modules/features/* folder (using git or another method)
(4) on the remote site, revert the feature.
Therein lies the problem: I have found that when working with teams of developers (I'm using the dCycle workflow for development), I have to explain to them that
- "updating" or "recreating" the feature synchronises the code to be like the database.
- "reverting" or "reviewing" the feature synchronises the database to be like the code.
In both cases, you can be either updating or reverting depending on the which code is more recent.
Perhaps wording such as this might be good:
drush feature-db-to-code
drush feature-code-to-db
...and in the GUI:
Sync database to code ... Recreate (as in the enclosed image)
| Comment | File | Size | Author |
|---|---|---|---|
| Screen shot 2012-02-28 at 4.58.54 PM.png | 105.33 KB | alberto56 |
Comments
Comment #1
alberto56 commentedsimplifying title
Comment #2
alberto56 commentedChanging category.
Comment #2.0
alberto56 commentedlink to dcycle
Comment #3
hefox commentedThere's an issue for this somewhere already to my memory, I recall reading something similair. Not marking as duplicate yet as don't feel like finding that issue.
Comment #4
mossy2100I support this improvement (see: http://drupal.org/node/1462020). I have recently been learning features and despite being a long-term experienced Drupal developer, I found the terminology unnecessarily confusing.
On the features page, it would be good to have "In sync"/"Out of sync" as albert56 suggests, as this is quite clear.
If "In sync", there can be one link to [Download].
If "Out of sync", there can be 3 links: [Update code from DB] [Update DB from code] [Download]
So, there is an additional improvement implicit here. At present, there's no way through the UI to update the feature code within the site. You have to recreate/download the feature, then copy the files into your site, which is tedious and should be unnecessary. Or you can use drush. A simple [Update code from DB] link would do the trick.
On the feature overview page (i.e. if you click Overridden), the two buttons [Update code from DB] [Update DB from code] need to be there as well, so you can do the update *of specific components* in either direction.
Comment #5
alberto56 commented@mossy2100 your idea of being able to update features through the UI is great. Because it is probably outside the scope of the current issue, I hope you don't mind me moving it another issue, here: #1465850: Update code from database, directly in the UI
Cheers,
Albert.
Comment #6
mossy2100nice one
Comment #7
mpotter commentedThis has been discussed in several other issues, so marking as dup. The current terminology is consistent with Views/ctools. We are waiting for the CMI in D8 to see what terminology they adopt. No plans to change Features till then.
Comment #7.0
mpotter commentedilnk to dycle