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

[3.x] Isolating Action Execution #105

Merged
merged 9 commits into from
Jan 21, 2023
Merged

[3.x] Isolating Action Execution #105

merged 9 commits into from
Jan 21, 2023

Conversation

andrey-helldar
Copy link
Member

If you are deploying your application across multiple servers and running migrations as part of your deployment process, you likely do not want two servers attempting to migrate
the database at the same time. To avoid this, you may use the isolated option when invoking the migrate:actions command.

When the isolated option is provided, Laravel will acquire an atomic lock using your application's cache driver before attempting to run your migrations. All other attempts to
run the migrate:actions command while that lock is held will not execute; however, the command will still exit with a successful exit status code:

php artisan migrate:actions --isolated

@andrey-helldar andrey-helldar linked an issue Jan 19, 2023 that may be closed by this pull request
@andrey-helldar andrey-helldar marked this pull request as ready for review January 21, 2023 13:22
@andrey-helldar andrey-helldar merged commit 006fef4 into main Jan 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Isolated option
1 participant