Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

[#48717] Do not reset AR cache and models column info before seeding.

Pavel Balashoua7f361d7d619
diff --git a/app/seeders/root_seeder.rb b/app/seeders/root_seeder.rb
index 586f493b667..d2f18c750c1 100644
--- a/app/seeders/root_seeder.rb
+++ b/app/seeders/root_seeder.rb
@@ -56,7 +56,6 @@ class RootSeeder < Seeder
end
def seed_data!
- reset_active_record!
set_locale! do
print_status "*** Seeding for locale: '#{I18n.locale}'"
prepare_seed! do
@@ -99,18 +98,6 @@ class RootSeeder < Seeder
::Rails::Engine.subclasses.map(&:instance)
end
- ##
- # Clears some schema caches and column information.
- def reset_active_record!
- ActiveRecord::Base
- .descendants
- .reject(&:abstract_class?)
- .each do |klass|
- klass.connection.schema_cache.clear!
- klass.reset_column_information
- end
- end
-
def set_locale!
I18n.with_locale(desired_lang) do
@locale_set = true