-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Build a CLI for running schema changes, migration etc #14
Comments
Command/args logic now in place and skeleton functions added that will be updated later. |
Basic command line functionality in place, now its just time to actually implement generate, run and rollback functions. |
How should we specify which connector we should use, for example: njord migration generate <name> --env=development --dry-run --connector=sqlite or during installation of the CLI with: cargo install njord --no-default-features --features sqlite |
By using: njord setup We should look for a file usually located in src/schema.rs if not specified elsewhere in |
Passing in Migration files generated successfully:
Version: 00000000000002
Name: --name=update_users
Environment: Some("--")
Dry-run: None |
This looks like something right up my alley 😁 |
@newtoallofthis123 Super! Would you have time to look at my previous comment with that issue with passing arguments? That would be very helpful since I do not have time at the moment to look at it. If you do, just fork the repo, send a PR. Thanks! |
Sure will |
Alright, I can not test right now, but could you look maybe into how we can strip the So we can pass only the "pure" values into the next function to call, either |
So, strip the string and have an enum? or something like that? |
Sounds good to me! |
The CLI has been improved with functionality of generating new schema changes and running it. However a lot of work still persists and help here is needed! Will pause this CLI tool since it's not really necessary at the moment. More important work is needed on Let me know if someone is interested in helping out here. |
I just forked the repo and will try to read through it to understand the code. Happy to continue work on this as soon I'm done |
Commands that should exist:
Flags that should exist on
njord
:-v
and--version
-h
and--help
Flags that should exist on
njord migration
:--dry-run
(simulate the migration)--env
(specify development/test/staging/production etc)--dir
(specify target directory for generated migration changes)--to
(rollback to specific version, for example20191225120000
)--log-level
(standard, debug etc)Examples:
The text was updated successfully, but these errors were encountered: