Created
April 22, 2013 03:52
-
-
Save xtfer/5432342 to your computer and use it in GitHub Desktop.
Fix for PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.type' in 'field list': SELECT base.fid AS fid, base.uid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$spec = array( | |
'description' => 'The type of this file.', | |
'type' => 'varchar', | |
'length' => 50, | |
'not null' => TRUE, | |
// If the FILE_TYPE_NONE constant ever changes, then change the value here | |
// too, and add an update function to deal with existing records. The | |
// constant isn't used here, because there may be cases where this function | |
// runs without the module file loaded. | |
'default' => 'undefined', | |
); | |
$indexes_new = array('indexes' => array('file_type' => array('type'))); | |
db_add_field('file_managed', 'type', $spec, $indexes_new); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment