refinery icon indicating copy to clipboard operation
refinery copied to clipboard

Support a function similar to flyway baseline

Open JamesWiresmith opened this issue 2 years ago • 1 comments

I've just been investigating refinery as an alternative to flyway - primarily because the application is now being written in Rust and automation is a lot easier with refinery.

One problem though is that I need to migrate an existing database. I need to be able to set on the production database the current migration version so unneeded migrations aren't applied.

But I still want the full set available for testing.

For example:

. I have migrations 1,2 and 3. . The database has already had migrations 1 and 2 applied by other tools. . I want to run a command against the database to say "only apply migrations from 3" or similar.

JamesWiresmith avatar Dec 11 '23 15:12 JamesWiresmith

I just noticed the -f flag in migrate.

So perhaps this would work by running flyway migrate -f -t 2? I'll have a chance to test it this week I hope.

JamesWiresmith avatar Dec 13 '23 16:12 JamesWiresmith