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

rubenv/sql-migrate -> golang-migrate tool #940

Closed
musinit opened this issue Jun 15, 2023 · 5 comments
Closed

rubenv/sql-migrate -> golang-migrate tool #940

musinit opened this issue Jun 15, 2023 · 5 comments

Comments

@musinit
Copy link

musinit commented Jun 15, 2023

Is your feature request related to a problem? Please describe.
We use sql-migrate (https://github.com/rubenv/sql-migrate) in our projects and we want to migrate to golang-migrate. We have a lot of migration files that we need to re-create for go-migrate format (with .up.sql, .down.sql postfix)

Describe the solution you'd like
Lib utils that would

  • rewrite migrations -> migrations-legacy
  • create a new migrations folder and re-create old migration files in a new format for go-migrate

Describe alternatives you've considered
Write this tiny util manually

Additional context
I am sure that would help a lot of teams to move from other migration tools to this one and make this library more popular.
We can implement migration tool for other libraries as well.

@dhui
Copy link
Member

dhui commented Jun 16, 2023

This is out of scope for this project and would unnecessarily complicate the build pipeline.
The migration tool sounds useful so I encourage to build and open source it. Once you've done so, we can link to it in our docs.

@musinit
Copy link
Author

musinit commented Jun 20, 2023

Ok, I will do it.

@musinit
Copy link
Author

musinit commented Jun 28, 2023

@dhui I did It:)
https://github.com/musinit/migradaptor
I think I can improve this one and add more sources for golang-migrate

@musinit
Copy link
Author

musinit commented Jun 29, 2023

Just added more sources: dbmate and goose

dhui added a commit that referenced this issue Jul 3, 2023
migradaptor can be used to migrate from other db migration tools to golang-migrate

#940 (comment)
@dhui
Copy link
Member

dhui commented Jul 3, 2023

Updated the README to mention migradaptor

@dhui dhui closed this as completed Jul 3, 2023
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