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

Use a different tool for DB migrations #34

Open
rkatic opened this issue Nov 30, 2020 · 5 comments · May be fixed by #36
Open

Use a different tool for DB migrations #34

rkatic opened this issue Nov 30, 2020 · 5 comments · May be fixed by #36

Comments

@rkatic
Copy link
Member

rkatic commented Nov 30, 2020

As @iblazevic brought to our attention, migratio seems to not be well maintained (last commit done in 2017), neither it gained a significant user-base.

@PetarIvancevic pointed to an interesting alternative: https://github.com/thomwright/postgres-migrations

@jglasovic
Copy link

As @iblazevic brought to our attention, migratio seems to not be well maintained (last commit done in 2017), neither it gained a significant user-base.

@jglasovic pointed to an interesting alternative: https://github.com/thomwright/postgres-migrations

Not me, @PetarIvancevic pointed to this alternative :)

@kula124p
Copy link
Contributor

No down migration is a bold decision.
Down migration can be cumbersome (when deleting stuff definitely) but it's rather useful nonetheless.
This "Idemo dalje!" methodology is an interesting one... Doesn't work very well in practice in my experience :^)

@rkatic
Copy link
Member Author

rkatic commented Dec 1, 2020

@jglasovic selected you by mistake.. going to fix the description.

@n00ne1mportant would be interested to hear in what cases you are finding down-migrations more useful than new forward ones, since in my experience I didn't find those useful for few reasons:

  • often not everything can be reversed with down migrations
  • usually are hard/cumbersome to test
  • therefore not reliable as new forward ones
  • almost never needed to "reverse" a migration (why then to even bother to write every time unstable/incomplete down migrations)

@kula124p
Copy link
Contributor

kula124p commented Dec 2, 2020

@rkatic
Since I never given it too much thought I did the responsible thing and googled it. Deeply. The way I've seen down migration is like a big red button you hit when you screw up the DB. You can revert API code easily but not the DB which means if migration fails on production you are stuck between a rock and a hard place (screwed).
Without down migration you can't bring back working previous version while finding the bug so it's creates pressure and downtime.
But basically everything you said is correct. They are cumbersome at best.

In some (mostly virtualizied) environments they are impossible anyway so I'm guessing moving forward without them makes sense when I think about it 👍

@rkatic
Copy link
Member Author

rkatic commented May 15, 2021

postgres-migration is being added with #36

@rkatic rkatic linked a pull request May 15, 2021 that will close this issue
5 tasks
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

Successfully merging a pull request may close this issue.

3 participants