Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When exporting variables using Strongarm via Features, although Features reports that no variables have changed, when downloading the feature and performing a diff, the Features Strongarm .inc file can potentially report many changes, especially when multiple developers are contributing to the feature from many different databases. This is because the database call in the variable_features_export_render() function relies on the databases sorting of the records returned. Always ordering variables by name would make diffing much easier!
Comment | File | Size | Author |
---|---|---|---|
#5 | 1311704-order_by_name-5.patch | 727 bytes | makara |
#1 | order-by-name-1311704-1.patch | 736 bytes | jantoine |
Comments
Comment #1
jantoine CreditAttribution: jantoine commentedPatch attached adding "ORDER BY name" to the query sting.
Comment #2
jantoine CreditAttribution: jantoine commentedI have com across this issue again and am curious as to the lack of feedback. Am I the only one experiencing this issue and if so, what am I doing wrong!
Comment #3
febbraro CreditAttribution: febbraro commentedI have never seen the scenario you are talking about, but if I had to guess I would say you are using MyISAM tables which I think defaults to insertion order if not specified, whereas InnoDB tables default to PK ASC order.
I added the order anyway so that we are explicit, hope it helps.
http://drupalcode.org/project/strongarm.git/commit/a0771b2
Comment #4
febbraro CreditAttribution: febbraro commentedComment #5
makara CreditAttribution: makara commentedA simple port.
Comment #6
patricksettle CreditAttribution: patricksettle commentedCommitted port - commit: e18eb9c
Comment #7
patricksettle CreditAttribution: patricksettle commentedsetting to correct "fixed" status