Hi

Schema module is reporting 2 mismatch tables in File Entity unstable7.

It might be a minor problem, but maybe it causes some other(s).

Image attached.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

Status: Active » Postponed (maintainer needs more info)

Based on that screenshot, it's impossible to tell what's actually different. Maybe this is a bug in the schema module?

Devin Carlson’s picture

Version: 7.x-2.0-unstable7 » 7.x-2.x-dev
Component: Miscellaneous » Code
Category: task » bug
Priority: Normal » Major
Status: Postponed (maintainer needs more info) » Needs review
FileSize
2.45 KB

I think I tracked this down:

I thought that the improper index declaration would result in no indexes being created but it actually caused indexes named 0 and 1 to be created on {file_type_mimetypes} and {file_type_streams}.

The attached patch fixes update 7201 and adds an update function to check if any broken indexes exist, drop them and then add the proper indexes.

ParisLiakos’s picture

Status: Needs review » Reviewed & tested by the community

ouch...this is bad..

Devin Carlson’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x-2.x

Status: Fixed » Closed (fixed)

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

jlk4p’s picture

Version: 7.x-2.x-dev » 7.x-2.0-unstable7

Just an FYI to anyone else that may try to apply the patch in #3 to the 7.x-2.0-unstable7 version. It does not fix the schema discrepancy. And if you apply the patch before attempting to install the file_entity module then the install will fail. In case this is useful for the developers my steps and results are below:

jlk4p$ patch < ../../../scripts/patches/fix-broken-indexes-1950696-2.patch.patch
patching file file_entity.install
Hunk #1 succeeded at 73 with fuzz 1 (offset -421 lines).
Hunk #2 succeeded at 96 with fuzz 1 (offset -425 lines).
Hunk #3 succeeded at 821 with fuzz 1 (offset 27 lines).

jlk4p$ drush en file_entity
PHP Fatal error: Cannot redeclare file_entity_update_7205() (previously declared in /drupal7/sites/all/modules/file_entity/file_entity.install:787) in /drupal7/sites/all/modules/file_entity/file_entity.install on line 864
PHP Stack trace:
PHP 1. {main}() /usr/local/drush/drush.php:0
PHP 2. drush_main() /usr/local/drush/drush.php:14
PHP 3. _drush_bootstrap_and_dispatch() /usr/local/drush/drush.php:59
PHP 4. drush_dispatch() /usr/local/drush/drush.php:90
PHP 5. call_user_func_array() /usr/local/drush/includes/command.inc:165
PHP 6. drush_command() /usr/local/drush/includes/command.inc:165
PHP 7. _drush_invoke_hooks() /usr/local/drush/includes/command.inc:198
PHP 8. call_user_func_array() /usr/local/drush/includes/command.inc:324
PHP 9. drush_pm_enable_validate() /usr/local/drush/includes/command.inc:324
PHP 10. drupal_check_module() /usr/local/drush/commands/pm/pm.drush.inc:846
PHP 11. module_load_install() /Users/jlk4p/Sites/drupal7/includes/install.inc:1211
PHP 12. module_load_include() /Users/jlk4p/Sites/drupal7/includes/module.inc:292

Fatal error: Cannot redeclare file_entity_update_7205() (previously declared in /drupal7/sites/all/modules/file_entity/file_entity.install:787) in /drupal7/sites/all/modules/file_entity/file_entity.install on line 864

Call Stack:
0.0010 705032 1. {main}() /usr/local/drush/drush.php:0
0.1550 5137912 2. drush_main() /usr/local/drush/drush.php:14
0.4093 11790048 3. _drush_bootstrap_and_dispatch() /usr/local/drush/drush.php:59
0.9875 59257088 4. drush_dispatch() /usr/local/drush/drush.php:90
1.0507 60002576 5. call_user_func_array() /usr/local/drush/includes/command.inc:165
1.0507 60003064 6. drush_command() /usr/local/drush/includes/command.inc:165
1.0508 60003640 7. _drush_invoke_hooks() /usr/local/drush/includes/command.inc:198
1.0513 60040336 8. call_user_func_array() /usr/local/drush/includes/command.inc:324
1.0513 60040824 9. drush_pm_enable_validate() /usr/local/drush/includes/command.inc:324
1.3923 61758816 10. drupal_check_module() /usr/local/drush/commands/pm/pm.drush.inc:846
1.3923 61758816 11. module_load_install() /Users/jlk4p/Sites/drupal7/includes/install.inc:1211
1.3923 61758952 12. module_load_include() /Users/jlk4p/Sites/drupal7/includes/module.inc:292

Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Cannot redeclare file_entity_update_7205() (previously declared in
/drupal7/sites/all/modules/file_entity/file_entity.install:787) in
/drupal7/sites/all/modules/file_entity/file_entity.install, line 864