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
Like schema migrations, you will get an error locally if you have pending schema migrations to run. Is this possible for data migrations as well? It looks like it once existed (#199) but I am not seeing any code anymore.
Do you otherwise need to use the rake tasks to check manually?
The text was updated successfully, but these errors were encountered:
I'm using this approach plus this check to make sure I'm not currently running a rake task in the development environment file to achieve this. I'd love to know if there's a better approach, but this seems to be working for our use case so sharing in case it's helpful to others. You end up with something like this:
config.after_initializedo# Check if we are currently in a rake task, see https://stackoverflow.com/questions/15538587unless(ENV['RACK_ENV'].blank? || ENV['RAILS_ENV'].blank? || !("#{ENV.inspect}" =~ /worker/i).blank?)Rails.application.load_tasksRake::Task['data:abort_if_pending_migrations'].invokeendend
Like schema migrations, you will get an error locally if you have pending schema migrations to run. Is this possible for data migrations as well? It looks like it once existed (#199) but I am not seeing any code anymore.
Do you otherwise need to use the rake tasks to check manually?
The text was updated successfully, but these errors were encountered: