Closed kael-shipman closed 5 years ago
On Tue, Jul 17, 2018 at 10:34 PM, Kael Shipman notifications@github.com wrote:
I'd rather there only be one shmig ;)
+1.
This is all good stuff, I'll get to it, just not as fast as you do. :)
Actually, the current behavior is what I would have guessed. Until to me means up to but not including. The descending case is confusing, I agree, but it was my first guess based on things like (i = 0; i<10;i++) (open on lower end, closed on top) and SQL date range where clauses (again, open on lower end, and closed on the top).
I think the commands could be named better but I think the behavior is OK.
It's also a backward incompatible change, so I need a stronger rationale to justify potentially breaking other people's working scripts. (Assuming someone other than you and I are using this in production ... :)
Since this
@mbucc, again, very sorry to pepper you with all this stuff. I hope I'm not bothering you too much. (If I am, I can just maintain my own fork of shmig and not worry about trying to stay compatible, but of course, I'd rather there only be one shmig ;).)
This time I've got a somewhat more philosophical issue. When I run
shmig up till=some-migration
, I expectsome-migration
to have been applied. Similarly, when I runshmig down till=some-migration
, I still expectsome-migration
to be applied.Think of it this way: Assuming
123456789-some_migration.sql
is the most recent migration, the following calls should produce no state changes at all.This makes sense because the
till
argument should presumably indicate that I want to be on that migration.Currently, however, the
till
argument produces the desired effect on upward migrations, but it runs the downward migration through thetill
argument, not to it.