You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rails has a super handy abort_if_pending_migrations that returns a status code that can be used to check whether all migrations have been run before serving traffic.
This kind of thing is super helpful in a kubernetes deployment
initContainers:
- command: ["/usr/local/bin/php", "artisan", "migrate:abort-if-pending"]
``
See here:
https://github.com/rails/rails/blob/main/activerecord/lib/active_record/railties/databases.rake#L339
I found this package: https://github.com/erjanmx/laravel-migrate-check
However it feels like something useful enough to become part of the artisan migrate command natively.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Rails has a super handy
abort_if_pending_migrations
that returns a status code that can be used to check whether all migrations have been run before serving traffic.This kind of thing is super helpful in a kubernetes deployment
Beta Was this translation helpful? Give feedback.
All reactions