Fix production run after go Rails 7.2

This commit is contained in:
Eric Guo
2025-03-08 11:57:30 +08:00
parent 48a129cc9f
commit 0db89d256c
3 changed files with 2 additions and 7 deletions
-5
View File
@@ -164,11 +164,6 @@ Rails.application.configure do
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
# Silence the following warning
# "Rails couldn't infer whether you are using multiple databases from your database.yml"
# This is deprecated in 7.1. and the warning got removed.
config.active_record.suppress_multiple_database_warning = true
if OpenProject::Configuration.enable_internal_assets_server?
config.public_file_server.enabled = true
config.public_file_server.headers = {
@@ -31,5 +31,5 @@ no_rake_task = !(Rake.respond_to?(:application) && Rake.application.top_level_ta
no_override = ENV["OPENPROJECT_DISABLE__MIGRATIONS__CHECK"] != "true"
if Rails.env.production? && !is_console && no_rake_task && no_override
ActiveRecord::Migration.check_pending! # will raise an exception and abort boot
ActiveRecord::Migration.check_all_pending! # will raise an exception and abort boot
end
+1 -1
View File
@@ -8,7 +8,7 @@ Timeout::timeout(timeout) do
sleep 4
begin
ActiveRecord::Migration.check_pending!
ActiveRecord::Migration.check_all_pending!
puts "[#{DateTime.now}] db ready"
exit 0