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 Go embed to embed migration in binary #12

Open
dolanor opened this issue May 19, 2021 · 1 comment
Open

use Go embed to embed migration in binary #12

dolanor opened this issue May 19, 2021 · 1 comment

Comments

@dolanor
Copy link

dolanor commented May 19, 2021

I have this use case where I migrate on startup, and I used markbates/pkger to have my migration files embedded.
Now that go:embed is here, I guess it makes more sense to use that.

Since I need it, I'm starting some implementation already and publish it in the issue once it's usable.
Of course, I'm open to change some implementation details if my design needs improvement.
Meanwhile, I'm open to ideas if it's not such a big undertaking for my own use case.

@gravis
Copy link
Member

gravis commented May 23, 2021

Hi! Thanks for reaching out. go:embed (introduced in go 1.16) looks like a great feature for this project. Just in case, I want to remind you that https://github.com/golang-migrate/migrate is probably way more advanced than this repository. If you still want to proceed with db-journey/migrate for your implementation, I'll be happy to review your code.
Thanks!

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