Download & Extend

FileField Paths does not report schema change to Files table.

Project:File (Field) Paths
Version:6.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

The Schema module reports:

Tables for which the schema and database are different:

  • system
    • files
      • origname: unexpected column in database

The origname column is added by filefield_paths.install.

Recommend adding the following function to filefield_paths.install:

<?php
/**
* Implementation of hook_schema_alter().
*
* @param $schema
*   The system-wide schema
*/
function filefield_paths_schema_alter(&$schema) {
 
$schema['files']['fields']['origname'] = array(
   
'description' => 'Original name of the file.',
   
'type' => 'varchar',
   
'length' => 255,
   
'not null' => TRUE,
   
'default' => '',
  );
}
?>

Comments

#1

Hi jshprentz,

Thanks, haven't used the Schema module personally but will look into it shortly.

Cheers,
Deciphered.

#2

Status:active» fixed

Hi jshprentz,

Fixed and committed to DRUPAL-6--1.
Unfortunately I failed on the commit message and forgot to give you due credit. CHANGELOG.txt will be updated in the next commit with due credit. Sorry, my bad.

Thanks again,
Deciphered.

#3

Status:fixed» closed (fixed)

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