Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
documentation
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 May 2014 at 15:19 UTC
Updated:
27 Jun 2014 at 22:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ducktape commentedAdded "optional" tag for parameter in db_add_field(), db_change_field and corresponding addField & changeField methods in Schema.php
Comment #2
dawehnerUsually we also describe the default avlue for these fields, see http://drupal.org/node/1354
Comment #3
ducktape commentedIt does mention the default value, but only when it's not obvious from the function signature. The "array()" looks clear enough to me.
Comment #4
jhodgdonI think this is fine. In this case, it seems pretty clear that if you do not specify keys/index then you will not be creating any keys/index, and the default of array() is in the function signature, as stated in #3. Thanks!
Comment #7
jhodgdonTest failure is #2273489: Random test failure 'Created time is correct.' in GenericCacheBackendUnitTestBase/ApcuBackendUnitTest, not due to this docs-only patch. Rather than test again, I went ahead and committed to 8.x. Thanks again!
Time for a 7.x backport please!
Comment #8
vegantriathleteworking on this
Comment #9
vegantriathletePatch for 7.x attached.
Comment #10
jhodgdonThanks! Looks like the right reroll, assuming the bot agrees.
Comment #11
jhodgdonThanks again! Committed to 7.x. On to 6.x... beware that in 6.x there are different versions of the database functions for different database drivers (different from how it is done in 7.x/8.x).
Comment #12
vegantriathleteWorking on backport to D6. Comments noted from above.
Comment #13
vegantriathleteIt looks like the functions are included in just one file: database.mysql-common.inc. However, I am not finding a schema.inc. Is this not a part of D6?
Comment #14
vegantriathleteIt looks like schema.inc was included in database.inc in D6 according to: https://api.drupal.org/api/drupal/includes%21database%21schema.inc/group...
Comment #15
vegantriathletePatch for D6 attached.
Comment #16
vegantriathleteComment #17
vegantriathleteComment #18
amitgoyal commentedPatch in #15 contains nothing, 0 bytes.
Comment #19
vegantriathleteI'm not sure how I ended up uploading an empty patch file. Here's the correct patch.
Comment #20
jhodgdonI'm not sure either, but I've seen it happen before and have even had it happen to myself occasionally. I filed:
#2284003: Zero-byte files
to investigate it.
Regarding this patch... It looks fine, but there is also a PostgreSQL version of the db_add_field function, so it probably needs an update too?
https://api.drupal.org/api/drupal/includes!database.pgsql.inc/function/d...
Comment #22
jhodgdonNo need to retest, since the patch needs work anyway... test bot glitch there!
Comment #23
amitgoyal commentedYes @jhodgdon, you are right that there is also a PostgreSQL version in #20.
Please review updated patch for the same.
Comment #24
jhodgdonLooks good now, thanks!
Comment #25
vegantriathleteIt's actually still not right. It should be "Keys" not "keys". Let me see about doing a quick fix.
Comment #26
vegantriathleteHere ya go!
Comment #27
jhodgdonGood catch!
Comment #29
jhodgdonThanks again everyone! Committed to 6.x.