-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add code lens for running migrations #239
Conversation
096cb2b
to
390d6d5
Compare
This is great! Thanks for contributing it. Since the LSP specification doesn't allow us to add more details to a code lens (all we have is the button label), I'm trying to think about how we can communicate the action that will occur as clearly as possible. For example, I can see someone clicking on the I have a couple of questions so that we can converge on the DX:
What I'm trying to figure out is:
Basically, the addition of the extra code lens would assist us in communicating to the developer that there's a difference between running all migrations and migrating to a specific version, which should help prevent confusion. |
I noticed this in the docs:
|
Thanks for sharing. Do people agree with using 3 code lenses?
I feel like usually people want to run |
Seems like my PRs are getting stale. I'll see if I can find some time to rebase and stuff the logic into different listeners. |
Personally I would be supportive of this order:
Andy is correct,
Yes, I think so. Rollbacks can specify a step count though, so that's slightly different. The default step is one, but you can do something like It is just really convenient to use the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we go with a single code lens, but that says Migrate to this version (2 versions behind latest)
?
I believe that would provide the full context and avoid needing multiple buttons.
On second thought, I think we may be over optimizing this too early. Figuring out how many migrations behind the current one is from the latest will require listing files and consume time in IO. How about we ship this with only |
8b006a9
to
83a5a86
Compare
Adds code lens to run migrations to specific versions in the terminal. This is convenient because it allows developers to quickly rollback or fast-forward to specific schema versions with a click.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
Closes #51
Adds code lens to run migrations to specific versions in the terminal. This is convenient because it allows developers to quickly rollback or fast-forward to specific schema versions with a click.