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

Check for pending migrations when watcher is fired #504

Merged

Conversation

vinistock
Copy link
Member

@vinistock vinistock commented Nov 1, 2024

Check for pending migrations, notify the user and offer to run them. The idea is that if any modifications are made to the db/migrate directory, we check if there are pending migrations.

If there are, we show a dialog and offers to run them. If the user decides to do it, we then fire a request to the server to run the migrations.

Note: we only show the dialog if a migration is deleted or created, otherwise it can become really annoying when you are editing the migration you just created.

Copy link
Member Author

vinistock commented Nov 1, 2024

@vinistock vinistock added the enhancement New feature or request label Nov 1, 2024 — with Graphite App
@vinistock vinistock force-pushed the 11-01-check_for_pending_migrations_when_watcher_is_fired branch from ccc9cc0 to 1de4925 Compare November 1, 2024 18:26
@vinistock vinistock marked this pull request as ready for review November 1, 2024 18:26
@vinistock vinistock requested a review from a team as a code owner November 1, 2024 18:27
@vinistock vinistock force-pushed the 11-01-add_support_for_checking_for_pending_migrations_and_running_them branch from 429fac9 to dedae91 Compare November 1, 2024 18:28
@vinistock vinistock force-pushed the 11-01-check_for_pending_migrations_when_watcher_is_fired branch from 1de4925 to 0208974 Compare November 1, 2024 18:28
@vinistock vinistock force-pushed the 11-01-add_support_for_checking_for_pending_migrations_and_running_them branch from dedae91 to b26a4ca Compare November 1, 2024 18:37
@vinistock vinistock force-pushed the 11-01-check_for_pending_migrations_when_watcher_is_fired branch 3 times, most recently from e9d2887 to 32a4d5e Compare November 1, 2024 18:57
@andyw8
Copy link
Contributor

andyw8 commented Nov 1, 2024

Perhaps we can also have it check for pending migrations when launched?

lib/ruby_lsp/ruby_lsp_rails/addon.rb Outdated Show resolved Hide resolved
lib/ruby_lsp/ruby_lsp_rails/addon.rb Outdated Show resolved Hide resolved
@vinistock vinistock force-pushed the 11-01-add_support_for_checking_for_pending_migrations_and_running_them branch from b26a4ca to d9eb436 Compare November 4, 2024 21:58
@vinistock vinistock force-pushed the 11-01-check_for_pending_migrations_when_watcher_is_fired branch from 32a4d5e to 14bd78a Compare November 4, 2024 21:58
Copy link
Member Author

Started checking after launching the runner client.

@vinistock vinistock changed the base branch from 11-01-add_support_for_checking_for_pending_migrations_and_running_them to graphite-base/504 November 4, 2024 22:10
@vinistock vinistock force-pushed the 11-01-check_for_pending_migrations_when_watcher_is_fired branch from 14bd78a to 70583f7 Compare November 4, 2024 22:11
@vinistock vinistock changed the base branch from graphite-base/504 to main November 4, 2024 22:11
@vinistock vinistock force-pushed the 11-01-check_for_pending_migrations_when_watcher_is_fired branch from 70583f7 to 159c774 Compare November 4, 2024 22:11
@vinistock vinistock requested a review from andyw8 November 4, 2024 22:12
@vinistock vinistock force-pushed the 11-01-check_for_pending_migrations_when_watcher_is_fired branch from 159c774 to 165dd54 Compare November 5, 2024 16:22
@vinistock vinistock merged commit 2267360 into main Nov 5, 2024
29 checks passed
Copy link
Member Author

Merge activity

  • Nov 5, 11:35 AM EST: A user merged this pull request with Graphite.

@vinistock vinistock deleted the 11-01-check_for_pending_migrations_when_watcher_is_fired branch November 5, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants