Being beta I guess these should be expected as it is a work in progress at this point. Entering here to create visibility.

Inconsistencies reported by schema module:

1. counter_data.counter_name is type varchar but its default 0 is PHP type integer
2. counter_data.counter_value is type varchar but its default 0 is PHP type integer
3. Mismatches:
nid: unexpected column in database
type: unexpected column in database
browser_name: unexpected column in database
browser_version: unexpected column in database
platform: unexpected column in database
indexes created: unexpected (not an error)
indexes ip: unexpected (not an error)
indexes nid: unexpected (not an error)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ovi.indrei’s picture

This bug affected me when migrating a database from PostgreSQL to MySQL using DTNBG Migrator.
I guess DTNBG Migrator uses the database schemas defined with hook_schema() in order to create the tables and columns in the new database and because of the schema mismatches that can be seen reported in this issue, the respective columns and indexes didn't get replicated in the new database.

Here's a patch that would fix the database schema inconsistencies.

ovi.indrei’s picture

Version: 7.x-1.0-beta3 » 7.x-1.x-dev
Status: Active » Needs review

Updated status to 'needs review'.

ElusiveMind’s picture

I came here looking to see if I needed to submit a patch. I will try this one.

The only question I have is "counter value". If this is an integer, shouldn't we change it to int and set the default to 0?

ElusiveMind’s picture

A couple of thoughts.

This patch does fix all of the schema reporting issues with the exception of the index on uid in the 'counter' table.

There is a larger issue with this install file however especially in running the update hooks on install which seems wrong. This install file really needs a good re-working. I'll do that and submit a patch this weekend.

I will leave the counter_value as a string for the time being given handling of 64 bit integer values. Not the best, but having had experience on Windows with the int field, I'm not feeling like playing with fire.

ElusiveMind’s picture

Didn't need to do as much re-working as I thought. Removed hook_install as that is redundant with a properly defined schema. Also added an update hook to add the index to uid.