Closed (won't fix)
Project:
Chaos Tool Suite (ctools)
Version:
8.x-1.x-dev
Component:
Exportables
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 May 2012 at 10:03 UTC
Updated:
10 Feb 2015 at 16:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
damiankloip commentedEvery time.....
Comment #2
tim.plunkettI think the ternary is still fine:
$data[$field] = ($set_defaults && !empty($info['default'])) ? $info['default'] : NULL;Comment #3
damiankloip commentedSure, that does make more sense.
Comment #4
dawehnerThis looks fine now
Comment #5
damiankloip commentedThanks for reviews, committed: http://drupalcode.org/project/ctools.git/commit/9260aa0
Comment #6
merlinofchaos commentedThis sets a key to NULL if it has a default but we chose not to set defaults, but does not set the key if we neglected to give it a default. We should set all schema keys regardless of whether it has an explicit default.
Also we seem to have lost the 'object default' I had. This existed because longtext and blob cannot have defaults in SQL but sometimes need defaults, so I created a non sql key as a workaround. We should probably retain that as well. Perhaps with a comment so that other people understand why I did that. ;)
Marking this active for this adjustment.
Comment #7
damienmckennaThe 8.x-1.x branch has been abandoned, 8.x-2.x is being rewritten from scratch, so this is no longer relevant.
Feel free to reopen if there's a project it's still appropriate for.
Comment #8
damienmckenna