Skip to content

Feature request: dry run functionality #89

Open
@MatthewBurstein

Description

@MatthewBurstein

For my CI pipeline, I would like to be able to dry run migrations so that I can show what migrations will run, then request approval from the user, then run them (not withstanding that there might be some change in between). The simplest form of this would be just a boolean config option passed to migrate called dryRun. If true, then instead of running the migrations we would just log a list of the migrations that will be run like the below. I guess ideally the migrations would be validated properly too but this isn's essential for my use case.

It could either output something like this

Migrations to be run:
003-some_migration.sql
004-some_other_migration.sql

or concatenate the file contents and output the actual sql.

I'm happy to raise a PR for this if there is an appetite for it...

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