When running database updates after upgrading the module to version 7.x-3.3 I am receiving the following error:

Update #7305
Failed: DatabaseSchemaObjectDoesNotExistException: Cannot change the definition of field backup_migrate_profiles.machine_name: field doesn't exist. in DatabaseSchema_mysql->changeField() (line 462 from /includes/database/mysql/schema.inc).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

padman created an issue. See original summary.

couturier’s picture

Can you still duplicate this error under the current 7.x-3.5 release?

s427’s picture

I have the same problem and I can confirm that it still occurs under the latest (7.x-3.5) release.

The following updates returned messages
backup_migrate module
Update #7305

    Failed: DatabaseSchemaObjectDoesNotExistException: Cannot change the definition of field backup_migrate_profiles.machine_name: field doesn't exist. in DatabaseSchema_mysql->changeField() (line 462 of C:\htdocs\my_website\includes\database\mysql\schema.inc).

Since update 7305 fails, the new update (7306) isn't applied either.

2 pending updates
backup_migrate module

    7305 - Fix schema mismatch after upgrade.
    7306 - Leave a message to explain the mixup over the backup option.

On the Status report page, Drupal warns me that those update should be performed immediately. So it would be nice to have a fix.

s427’s picture

(Actually, I "solved" it by uninstalling and reinstalling the module.)

couturier’s picture

That's weird. I guess we will leave this issue open a little longer to see if anyone else is having this problem, but it sounds random and rare.

liquidcms’s picture

Version: 7.x-3.3 » 7.x-3.5
Component: Miscellaneous » Code

Yes, i get same issue when trying to run update after upgrading to 7.35

Andru’s picture

Same error, on 7.58 updating backup_migrate to 7.x-3.5.
Likewise disabling, uninstalling, and re-enabling the module fixed this.
On PHP 7.0.

couturier’s picture

Okay, so apparently some people are having this problem but not others. I don't recall seeing any old issues similar to it, so it could be something that was introduced with the 7.x-3.3 release and has continued until now with the 3.5. If so, we are currently working on another unrelated problem that we think can be traced to a commit that introduced an error within a certain time frame from one release of Backup and Migrate to the next. You can see how we found which commits might have been relevant at this comment.

Following up to @Andru at comment #7, is there any chance this error could be related to the version of PHP in use? I'd be curious which version other reporters were using.

DamienMcKenna’s picture

Version: 7.x-3.5 » 7.x-3.x-dev
Status: Active » Needs review
FileSize
1.48 KB

Does this fix the problem?

Status: Needs review » Needs work

The last submitted patch, 9: backup_migrate-n2917959-9.patch, failed testing. View results

DamienMcKenna’s picture

Status: Needs work » Needs review

  • DamienMcKenna committed e88fab1 on 7.x-3.x
    Issue #2917959 by DamienMcKenna: Updated backup_migrate_update_7305() to...
DamienMcKenna’s picture

Status: Needs review » Fixed
Parent issue: » #2942331: Plan for Backup and Migrate 7.x-3.6

Committed.

liquidcms’s picture

Status: Fixed » Needs work

I just grabbed latest -dev and i still get this error when running updates:

backup_migrate module
Update #7305

    Failed: DatabaseSchemaObjectExistsException: Cannot add field backup_migrate_sources.machine_name: field already exists. in DatabaseSchema_mysql->addField() (line 336 of /home/admin/public_html/stage/includes/database/mysql/schema.inc).

Will do uninstall/re-install.

liquidcms’s picture

Uninstall/reinstall worked.

couturier’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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

drupal-son’s picture

Exactly the same situation than #14 and #15.

m.stenta’s picture

There is a bug with the commit made in comment #12 above. $machine_name is not defined.

Line 857 of install file: https://cgit.drupalcode.org/backup_migrate/tree/backup_migrate.install?h...

DamienMcKenna’s picture

I've uploaded a patch in #3033583: CTools exportables code no longer loading that might fix the bug, let's continue the discussion there.