mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FIX: Can't reset AR schema cache due to versions table.
This commit is contained in:
parent
eafab41a2c
commit
0e656ff213
1 changed files with 1 additions and 1 deletions
|
@ -447,7 +447,7 @@ module Discourse
|
||||||
|
|
||||||
def self.reset_active_record_cache
|
def self.reset_active_record_cache
|
||||||
ActiveRecord::Base.connection.query_cache.clear
|
ActiveRecord::Base.connection.query_cache.clear
|
||||||
(ActiveRecord::Base.connection.tables - %w[schema_migrations]).each do |table|
|
(ActiveRecord::Base.connection.tables - %w[schema_migrations versions]).each do |table|
|
||||||
table.classify.constantize.reset_column_information rescue nil
|
table.classify.constantize.reset_column_information rescue nil
|
||||||
end
|
end
|
||||||
nil
|
nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue