mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 05:40:52 +08:00
FIX: Make DbProvider#table_exits?
work with multisite.
This commit is contained in:
parent
f496302c2c
commit
22a1db7b8a
|
@ -56,8 +56,13 @@ class SiteSettings::DbProvider
|
|||
|
||||
# table is not in the db yet, initial migration, etc
|
||||
def table_exists?
|
||||
@table_exists = ActiveRecord::Base.connection.table_exists? @model.table_name unless @table_exists
|
||||
@table_exists
|
||||
@table_exists ||= {}
|
||||
|
||||
unless @table_exists[current_site]
|
||||
@table_exists[current_site] = ActiveRecord::Base.connection.table_exists?(@model.table_name)
|
||||
end
|
||||
|
||||
@table_exists[current_site]
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user