Automatically run DUSs in development (#15489)

robots doing things >>>>>>>>>>> robots telling humans to do things
This commit is contained in:
Jamie Gaskins 2021-11-24 12:32:13 -05:00 committed by GitHub
parent 6e275a12fc
commit 34ad76ab1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -135,9 +135,9 @@ Rails.application.configure do
# Check if there are any data update scripts to run during startup
if %w[Console Server DBConsole].any? { |const| Rails.const_defined?(const) } && DataUpdateScript.scripts_to_run?
message = "Data update scripts need to be run before you can start the application. " \
"Please run 'rails data_updates:run'"
raise message
Rails.application.load_tasks
puts "Running data updates..." # rubocop:disable Rails/Output
Rake::Task["data_updates:run"].invoke
end
end
end