Matt
Matt
At this point it makes the process of creating two timestamped files faster. There is more discussion here: https://github.com/mattes/migrate/issues/202#issuecomment-297123511 https://github.com/mattes/migrate/issues/205 Happy to merge PRs that make things better.
Here is what you want to do: ``` $ migrate create -dir migrations -ext sql test $ ls migrations 1501691280_test.down.sql 1501691280_test.up.sql $ migrate -path ./migrations -database postgres://postgres:postgres@localhost:5432/ur?sslmode=disable up ```
Interesting. I wasn't aware Rails does that and couldn't find that behavior in https://github.com/rails/rails/blob/master/activerecord/lib/active_record/migration.rb Can you help me out or send some other docs?
You are right. Rails actually does that and I'm super surprised. How does it handle conflicting migrations then?
If it's independent files/migrations merge conflicts seem unlikely, I guess.
## Behavior A (current): Current version is `2`. 1_migration.up.sql 2_migration.up.sql 3_migration.up.sql 4_migration.up.sql `migrate up` will apply `3_migration.up.sql` and `4_migration.up.sql` ## Behavior B (suggested): Current version is `2` but `1_migration.up.sql` wasn't...
Can we get some more feedback on this? cc @dimag-jfrog @gravis @dinedal @dacamp @raizyr @skeswa @dereulenspiegel @balboah @johnweldon @buddhamagnet @divoxx @ngauthier @fsouza
Thanks for your feedback. I'm open to changing it. A lot of people ran into this.
Might be related to #274 . How do you run the tests?
Quickly scanned the code. Try to use a **directory** path with `migrate.New` (instead of `m, err := migrate.New("file://migrate.up.sql",`)