diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-11-12 16:24:09 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-11-12 16:24:09 +0100 |
commit | 19398ab98af04eedb2574890ed0d8ecdf82ebb4c (patch) | |
tree | 8e2c0d2052136b82c7d8664dc146c9791fa7b4d8 /activerecord/lib/active_record/migration.rb | |
parent | 53d04697d5c9450ecb5b7f37bdf0d5f12dd5ded5 (diff) | |
parent | 7429633b824cf8aaeea52d11876e7bd2b8d2f256 (diff) | |
download | rails-19398ab98af04eedb2574890ed0d8ecdf82ebb4c.tar.gz rails-19398ab98af04eedb2574890ed0d8ecdf82ebb4c.tar.bz2 rails-19398ab98af04eedb2574890ed0d8ecdf82ebb4c.zip |
Merge pull request #21601 from yui-knk/fix/ar_tables_without_view2
All `AR::ConnectionAdapters#tables` return only tables(exclude views)
Diffstat (limited to 'activerecord/lib/active_record/migration.rb')
-rw-r--r-- | activerecord/lib/active_record/migration.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index 1e870d4c44..ffd243a517 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -967,10 +967,12 @@ module ActiveRecord end def get_all_versions(connection = Base.connection) - if connection.table_exists?(schema_migrations_table_name) - SchemaMigration.all.map { |x| x.version.to_i }.sort - else - [] + ActiveSupport::Deprecation.silence do + if connection.table_exists?(schema_migrations_table_name) + SchemaMigration.all.map { |x| x.version.to_i }.sort + else + [] + end end end |