mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
squelch table exists? queries.
This commit is contained in:
@@ -24,7 +24,7 @@ module ActiveRecord
|
||||
# table_exists?(:developers)
|
||||
def table_exists?(table_name)
|
||||
begin
|
||||
select_value("SELECT 1 FROM #{quote_table_name(table_name)} where 1=0")
|
||||
select_value("SELECT 1 FROM #{quote_table_name(table_name)} where 1=0", 'SCHEMA')
|
||||
true
|
||||
rescue
|
||||
false
|
||||
|
||||
Reference in New Issue
Block a user