-
Notifications
You must be signed in to change notification settings - Fork 63
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
Automated sql migrations #43
Comments
hey @AlNotAlbert thanks again for creating this issue -- I'd love to have something like this in create-rust-app. I've been thinking about how we should include this, and the best way is probably by adding it as an option when The flow would look something like this: # 1. create a project
create-rust-app migration-generation-test
cd migration-generation test
# 2. create your stricts marked with `#[derive(Model)]`, etc.
# 3. run create-rust-app and select generate-migrations
create-rust-app
> Generate migrations
# ... the option should run the models-cli migration generator and then rename the folders appropriately. Implementation-wise, we would need to:
This is preferable for now until we start supporting sqlx or other diesel alternatives since we don't include any extra dependencies and expect the user to install the models-cli Thanks for your patience, it's been busy~ |
Check out: http://diesel.rs/news/2_1_0_release.html It's slightly different than tvallotton's |
https://github.com/tvallotton/models
this tool will generate migrations for structs as long as they are annotated with a derive model macro and macros to describe the constraints on the sql fields.
this are the migrations generated by diesel
this is the migration generated by the models_cli tool with the
models generate -r
commandThe text was updated successfully, but these errors were encountered: