API page: http://api.drupal.org/node/21346

This documentation incorrectly states "All parameters apart from 'type' are optional except that type 'numeric' columns must specify 'precision' and 'scale'. "

The 'length' parameter must be specified for type 'varchar' columns, at least when using MySQL InnoDB.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Title: length required for varchar » Schema API docs don't say length is required for varchar
Version: 7.x-dev » 8.x-dev
Issue tags: +Novice, +Needs backport to D7

Good point. Actual URL of the page is:
http://api.drupal.org/api/drupal/includes%21database%21schema.inc/group/...

This is probably a good Novice project to update this documentation.

NROTC_Webmaster’s picture

Status: Active » Needs review
FileSize
820 bytes

I'm not sure of the exact wording that you were looking for but take a look at this and let me know if I should change it.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

This looks good to me. I'll leave it at RTBC for a few days to see if anyone more of a database expert than I am objects to this change.

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x and 7.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Fixed API page link