rubenv / sql-migrate

SQL schema migration tool for Go.
MIT License
3.16k stars 269 forks source link

Add a new option to migrate up/down command to support migration to a specific version #232

Closed qhchen88 closed 1 year ago

qhchen88 commented 1 year ago

This is yet another way to limit the number of migrations. It's easy for users to figure out the target version instead of counting the limit number.

rubenv commented 1 year ago

I like it, but I don't want to break compatibility by adding a new parameter, especially one that should be zero if other parameters are set. It'll cause all existing code using this library to break.

Better to add a new function.

qhchen88 commented 1 year ago

Updated:

rubenv commented 1 year ago

Ok, this looks great now, purely additive so it doesn't break anything. I see no further reason not to merge this.

Thanks!

rubenv commented 1 year ago

Released as v1.3.0