Change record status: 
Project: 
Introduced in branch: 
8.x, 7.x
Introduced in version: 
7.14
Description: 

All fetched database table columns were converted into lowercase previously. This was introduced during D7 development, but turned out to break third-party integrations, so it has been reverted.

Pre-7.14 Example

db_create_table('foo');
db_add_field('foo', 'barID', array('type' => 'int', 'not null' => FALSE));
db_insert('foo')->fields(array('barID' => 3)->execute();

debug(db_query('SELECT * FROM {foo} WHERE barID = :id', array(':id' => 3))->fetchObject());
// yields:
array(
 'barid' => '3',
)

Thus, queries on database tables having column names with mixed letter casing had to be manually pre-processed and post-processed, or developers had to resort to only use lowercase columns in the first place (which is not always possible).

6.x, 7.14+, and 8.x

All database table columns are fetched in their original/natural casing:

debug(db_query('SELECT * FROM {foo} WHERE barID = :id', array(':id' => 3))->fetchObject());
// yields:
array(
 'barID' => '3',
)

Note: When upgrading from D6, nothing has to be changed, since database table columns were always fetched in their natural case previously.

Impacts: 
Module developers