postgrator-cli icon indicating copy to clipboard operation
postgrator-cli copied to clipboard

Add option for single up and down migrations

Open AxelTerizaki opened this issue 4 years ago • 1 comments

Hello !

First off, thanks for this tool, I find it much easier to use and understand than others, and it's working well.

I was wondering if it would be possible to add a single up and down command, like this :

postgrator up

or something like

postgrator --migrationsToDo=1

The goal is to run migrations one at a time. A down version would be nice as well. It allows easier testing of migrations, as with those commands I can simply up and down quickly to test if my do/undo migrations are working (do and undo command line arguments could work as well).

This is also useful when migrating from one dev branch to the other on projects, so you can easily undo a migration on your test database before switching back to the main branch to test something else.

Thanks in advance for considering this feature.

AxelTerizaki avatar May 11 '20 15:05 AxelTerizaki

Haha, I just realized now that you weren't the author of postgrator but just of the cli-tool.

Should I post my issue there instead, before bothering you with it? I'm not sure if it can be done purely with a CLI tool.

AxelTerizaki avatar May 12 '20 20:05 AxelTerizaki