mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Make DbProvider#table_exits? work with multisite.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user