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
Comment #1
ronan commentedAwesome, thanks for the patch. Committed.
Comment #3
tim.plunkettNoticed 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
Comment #4
ronan commentedEasy enough. Patch committed, thanks.