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

Add support for checking for pending migrations and running them #503

Conversation

vinistock
Copy link
Member

@vinistock vinistock commented Nov 1, 2024

Add the ability to check for pending migrations and run them through the Rails runner client.

For checking if something is pending, we use the Rails API directly, which raises if there are any pending migrations.

For running them, we can't do it in process. The code that runs migrations is not designed to be invoked repeatedly and uses load, which means that we could end up with a memory bloat. I used Open3.capture2 to run in a child process and grab the results.

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 marked this pull request as ready for review November 1, 2024 18:22
@vinistock vinistock requested a review from a team as a code owner November 1, 2024 18:22
@vinistock vinistock force-pushed the 11-01-add_support_for_checking_for_pending_migrations_and_running_them branch 2 times, most recently from dedae91 to b26a4ca Compare November 1, 2024 18:37
@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 merged commit 2a3558b into main Nov 4, 2024
30 checks passed
Copy link
Member Author

Merge activity

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

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.

3 participants