I'm also using the Schema module, and when checking for consistency, backup_migrate gives two errors and two mismatches.

ERRORS:

backup_migrate_schedules.destination_id is type varchar but its default 0 is PHP type integer
backup_migrate_schedules.profile_id is type varchar but its default 0 is PHP type integer

MISMATCHES:
backup_migrate_profiles.append_timestamp

declared: array('description'=>t('TODO: please describe this field!'),'type'=>'int','unsigned'=>TRUE,'size'=>'tiny','length'=>1,'not null'=>TRUE,'default'=>0)
actual: array('description'=>t('TODO: please describe this field!'),'type'=>'int','unsigned'=>TRUE,'size'=>'tiny','disp-width'=>'1','not null'=>TRUE,'default'=>0)

backup_migrate_schedules.enabled

declared: array('description'=>t('TODO: please describe this field!'),'type'=>'int','unsigned'=>TRUE,'size'=>'tiny','length'=>1,'not null'=>TRUE,'default'=>0)
actual: array('description'=>t('TODO: please describe this field!'),'type'=>'int','unsigned'=>TRUE,'size'=>'tiny','disp-width'=>'1','not null'=>TRUE,'default'=>0)

backup_migrate_schedules.cron

declared: array('description'=>t('TODO: please describe this field!'),'type'=>'int','unsigned'=>TRUE,'size'=>'tiny','length'=>1,'not null'=>TRUE,'default'=>0)
actual: array('description'=>t('TODO: please describe this field!'),'type'=>'int','unsigned'=>TRUE,'size'=>'tiny','disp-width'=>'1','not null'=>TRUE,'default'=>0)

The issues are in the backup_migrate.install implementation of hook_schema().
The default of a varchar would be '0', not 0.
The property length does not affect numeric inputs.
See attached patch.

Comments

ronan’s picture

Status: Needs review » Fixed

Awesome, thanks for the patch. Committed.

Status: Fixed » Closed (fixed)

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

tim.plunkett’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new406 bytes

Noticed another issue.
When you "Refactored the code to manage profiles, destinations and schedules" with commit #233980, you added 'length' to an int.

I know these are extremely small issues in the grand scheme (schema?) of things, but it does make my life easier since Schema causes the status report to yell at me constantly when there are discrepancies.

See attached

ronan’s picture

Status: Needs review » Fixed

Easy enough. Patch committed, thanks.

Status: Fixed » Closed (fixed)

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