Skip to content

Contain migration name in error if pending actions are still present #719

@LordSimal

Description

@LordSimal

This is a (multiple allowed):

  • bug

  • enhancement

  • feature-discussion (RFC)

  • CakePHP Version: 5.1.0-RC1

  • Migrations plugin version: 4.3.1

  • PHP Version: PHP 8.3.7

What you did

With the newest version of migrations it will throw an error if you have a migration which looks like this

$this->table('some_table')->drop();

because it should have actually been

$this->table('some_table')->drop()->save();

Expected Behavior

The error should contain the migration file which caused the error so its easier to debug, not just what you can see bellow

Actual Behavior

Could not apply migrations for {"plugin":"AlfredStaffMembers","connection":"test"}
Migrations failed to apply with message:
Migration has pending actions after execution!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions