Skip to content

improve Status performance; add ability to retrieve latest N migrations #282

@mfridman

Description

@mfridman

Currently the implementation of the status command is to loop over all the migrations and get the db metadata one-by-one. I think we can do better by retrieving all migrations at once, although to future proof we could just paginate which would be a few round trips.

This would enable us to list latest N migrations, which has been requested in #254

Lastly, this will enable us to display migrations based on their applied order, instead of their migration file order. See comment #280 (comment). This is important because in #262 we added out-of-order migrations, so the file order no longer is the source of truth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions