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

feat(sql):Added File based migrations #1561

Closed
wants to merge 0 commits into from

Conversation

Sir-Thom
Copy link

Added a way to do file based migrations
I have also added in the README.md. how to do it.

this solve issue #1347

@Sir-Thom Sir-Thom requested a review from a team as a code owner July 17, 2024 18:51
@FabianLars
Copy link
Member

What is the actual intention? Should it be a built time thing or are the migrations supposed to be dynamically loaded from the user's system (requiring you to bundle the migration files with your app, for example with the resources feature).

To me the build time approach makes sense (and the issue sounds like that to me) but your implementation loads it from the system running the app.

p.s. also, is there a way to get rid of Box::leak? Not a fan of that in this context tbh.

@Sir-Thom
Copy link
Author

What is the actual intention? Should it be a built time thing or are the migrations supposed to be dynamically loaded from the user's system (requiring you to bundle the migration files with your app, for example with the resources feature).

To me the build time approach makes sense (and the issue sounds like that to me) but your implementation loads it from the system running the app.

p.s. also, is there a way to get rid of Box::leak? Not a fan of that in this context tbh.

Yeah, it makes more sense to do it via build time. I am currently reworking on it to create an autogenerated file created during build time that can be used as a migration list so the user only has to set 2 env one for the project root and one for the migration directory and the user only has to do . add_migrations ("sqlite: test. db", migrations())
here what it look like currently

demo_file_base_migration.mp4

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 this pull request may close these issues.

2 participants