Skip to content

Add database migration commands to Cornucopia CLI #309

Description

@ce1r

Describe the problem

It would be convenient to have the CLI automatically search the migrations directory for sequential or timestamped migrations and run them in order.

Also, having the CLI source the .env file in the current directory for the DATABASE_URL environment variable would be a good addition as well.

Describe the solution you'd like

I'd like to have the commands cornucopia migrate {add | run | revert} added, alongside potentially some database management management commands like cornucopia database {create | drop | reset | setup}.

Alternatives considered

Just using the SQLx CLI for it.

Additional context

No response

Importance

Would make my life easier

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions