+
Skip to content

Migration CLI fails when there's nothing to do #6267

@myndzi

Description

@myndzi

#5541 introduced lifecycle hooks into the migrator, but avoids running them if there are no migrations to execute. It returns an empty array from _runBatch in this case, but if there is work to do it returns the result of this._waterfallBatch, which differs: _waterfallBatch returns [0, []] when it has nothing to do.

This causes a confusing error (Uncaught TypeError: Cannot read properties of undefined (reading 'length')) when a user runs migrations from the CLI but no migrations need to be applied (e.g. already at latest / earliest).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载