Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include missing migrations #183

Closed
bugzpodder opened this issue Jun 24, 2019 · 2 comments
Closed

include missing migrations #183

bugzpodder opened this issue Jun 24, 2019 · 2 comments

Comments

@bugzpodder
Copy link

bugzpodder commented Jun 24, 2019

I've been using a fork of this package (see #140) to use --include-missing flag. https://github.com/elijahcarrel/goose/
This is probably same as #63 (comment)

With regards to
https://github.com/pressly/goose#hybrid-versioning
I'd like to clarify why this doesn't fit my needs:

  1. --include-missing is not used in production, so the --fix flag that renames migration does not apply.
  2. --including-missing flag is used in development only. To use the example from sequential numbering with postgres or redshift schemas #63 (comment)

joe branch:

migrations/2018-09-15-12:00:00_joe_1.sql
migrations/2018-10-10-12:00:00_joe_2.sql

alice branch:

migrations/2018-10-01-12:00:00_alice_1.sql
migrations/2018-10-18-12:00:00_alice_2.sql

Joe's branch get merged into master branch first:
master branch:

+migrations/2018-09-15-12:00:00_joe_1.sql
+migrations/2018-10-10-12:00:00_joe_2.sql

Alice rebased her branch to master and has:

migrations/2018-09-15-12:00:00_joe_1.sql
migrations/2018-10-01-12:00:00_alice_1.sql
migrations/2018-10-10-12:00:00_joe_2.sql
migrations/2018-10-18-12:00:00_alice_2.sql

Alice tries to run goose up on her own dev instance, but cannot apply joe's migrations without --including-missing flag.

While the down flag might be used to undo Alice's migrations,

  • It is tedious to do this every time
  • Not every migration has a down, or it may take too much effort (think a super complicated migration)
@bugzpodder
Copy link
Author

owner is unresponsive so assuming no interest, closing.

@elijahcarrel
Copy link

Out of order migrations have been added in #280

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants