The module Schema reported tables for which the schema and database are different.

CommentFileSizeAuthor
#11 boost-668274.patch1.43 KBmikeytown2
#6 boost-668274.patch1.08 KBmikeytown2

Comments

nardberjean’s picture

admin/build/schema/compare

Top of page warning

      boost_cache.filename is type text and may not have a default value
      boost_cache.url is type text and may not have a default value
      boost_crawler.url is type text and may not have a default value

Tables for which the schema and database are different.

boost

*
boost_cache

o column filename - difference on: default
declared: array('description' => t('TODO: please describe this field!'), 'type' => 'text', 'not null' => TRUE, 'default' => '')
actual: array('description' => t('TODO: please describe this field!'), 'type' => 'text', 'not null' => TRUE)

o column url - difference on: default
declared: array('description' => t('TODO: please describe this field!'), 'type' => 'text', 'not null' => TRUE, 'default' => '')
actual: array('description' => t('TODO: please describe this field!'), 'type' => 'text', 'not null' => TRUE)

*
boost_crawler

o column url - difference on: default
declared: array('description' => t('TODO: please describe this field!'), 'type' => 'text', 'not null' => TRUE, 'default' => '')
actual: array('description' => t('TODO: please describe this field!'), 'type' => 'text', 'not null' => TRUE)

mikeytown2’s picture

Can you give me more details on what's missing/incorrect?

mikeytown2’s picture

Version: 6.x-1.17 » 6.x-1.x-dev

Sounds like default values are throwing the errors. Can you try this with the latest dev version? This issue might have fixed some of the errors reported here #664720: Installation does not work correctly with certain versions of MySQL

nardberjean’s picture

Problems upgrading to 6.x-1.x-dev from 6.x-1.17

Datebase upgrade was fine:

The following queries were executed

boost module

Update #6122

* ALTER TABLE {boost_cache} CHANGE `filename` `filename` TEXT NOT NULL

* ALTER TABLE {boost_cache} CHANGE `url` `url` TEXT NOT NULL

* ALTER TABLE {boost_crawler} CHANGE `url` `url` TEXT NOT NULL

Update #6123

* ALTER TABLE {boost_cache_relationships} ADD INDEX base_dir (base_dir)

* ALTER TABLE {boost_cache_relationships} ADD INDEX page_callback (page_callback)

* ALTER TABLE {boost_cache_relationships} ADD INDEX page_id (page_id)

* ALTER TABLE {boost_cache_relationships} ADD INDEX child_page_callback (child_page_callback)

* ALTER TABLE {boost_cache_relationships} ADD INDEX child_page_type (child_page_type)

* ALTER TABLE {boost_cache_relationships} ADD INDEX child_page_id (child_page_id)

* ALTER TABLE {boost_cache_relationships} ADD INDEX hash_url (hash_url)

* ALTER TABLE {boost_cache_relationships} ADD INDEX timestamp (timestamp)

But there is a new problem, admin/build/schema/compare reports now:

*
boost_cache_relationships

o indexes page_type: missing in database

nardberjean’s picture

Unselecting, uninstalling and reinstalling the boost module solves the issue.

Status page reported MySQL version: 5.0.51a

mikeytown2’s picture

Status: Active » Needs review
StatusFileSize
new1.08 KB

means I forgot to add in an index on page_type in the boost_cache_relationships when running boost_update_6123... so need to make 6124

mikeytown2’s picture

Status: Needs review » Fixed

committed; let me know if you find anything else :)

nardberjean’s picture

Thanks a lot!

mikeytown2’s picture

note that I didn't get the final version of the update function in today's dev release. The query still runs so its mainly a cosmetic issue.

srobert72’s picture

Status: Fixed » Active

I've just ran update and have error.

user warning: Duplicate key name 'page_type' query: ALTER TABLE boost_cache_relationships ADD INDEX page_type (page_id) in /drupal_home/includes/database.mysql-common.inc on line 434.
The following queries were executed
boost module
Update #6124
Failed: ALTER TABLE {boost_cache_relationships} ADD INDEX page_type (page_id)

Before this update it was fresh new fresh install of the module and those 2 indexes already exist.
I also wonder if there's not confusion in that SQL update between page_type and page_id.

Extract of my indexes in "boost_cache_relationships" table :
INDEX_NAME | INDEX | COLUMN_NAME
page_type | INDEX | page_type
page_id | INDEX | page_id

mikeytown2’s picture

Status: Active » Needs review
StatusFileSize
new1.43 KB

if you installed a new version of boost then it would already have the key... looks like I'll use the "if key doesn't exists add one function". The error is simply saying the key already exits; nothing major but it could be a concern.

mikeytown2’s picture

Status: Needs review » Fixed

committed

Status: Fixed » Closed (fixed)

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

sinasquax’s picture

This problem also appears with version 6.x-1.18 in the boost_update_6115() of the install file.