after fresh install

table advagg_files
column content_hash - differences on: not null, default

declared: array('description' => 'TODO: please describe this field!', 'type' => 'char', 'length' => 43, 'not null' => TRUE, 'default' => '')

actual: array('description' => 'TODO: please describe this field!', 'type' => 'char', 'length' => '43', 'not null' => FALSE)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeytown2’s picture

That doesn't match what is in the code http://cgit.drupalcode.org/advagg/tree/advagg.install#n131

There is no TODO anywhere. Help me understand what's wrong. What did you use to get your information and what type of SQL server do you have.

      'content_hash' => array(
        'description' => 'Hash of the file content. Used to see if the file has changed.',
        'type' => 'char',
        'length' => 43,
        'not null' => TRUE,
        'default' => '',
        'binary' => TRUE,
        'collation' => 'ascii_bin',
        'charset' => 'ascii',
      ),

jabecz’s picture

I have just reproduced the issue at

https://depf.ply.st/node#overlay=admin/structure/schema

but I am not able to debug what code creates mismatching column with "TODO ...." description.

there is no "TODO ...." stuff in advagg.install as you mentioned.

mikeytown2’s picture

https://www.drupal.org/project/schema is the module in question; I'll take a look at it tomorrow

jabecz’s picture

Title: Inconsistent » Inconsistent database to schema
jabecz’s picture

I have just installed "Advagg" with no "Schema" module and the content_hash column is "NULL : YES".

mikeytown2’s picture

Missing descriptions has to do with the way the schema module is used.

Inside the schema_compare function it calls drupal_get_schema this then calls drupal_get_complete_schema which then calls _drupal_schema_initialize which removes the description from every entry.

In order for the schema module to actually work correctly it would need to implement it's own version of drupal_get_complete_schema() that calls _drupal_schema_initialize($schema, $module, $remove_descriptions) where $remove_descriptions is set to FALSE. This is a bug in the schema module.

mikeytown2’s picture

Title: Inconsistent database to schema » Inconsistent database to schema - Issue with advagg_install_change_table_collation()

Root of this issue is the advagg_install_change_table_collation function.

mikeytown2’s picture

Status: Active » Fixed
FileSize
5.81 KB

  • mikeytown2 committed 55e1941 on 7.x-2.x
    Issue #2531766 by mikeytown2: Fix db and schema issues.
    

  • mikeytown2 committed 32d590a on 7.x-2.x
    Issue #2531766 by mikeytown2: Fix issue with install and schema.
    
mikeytown2’s picture

Status: Fixed » Closed (fixed)

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