diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-16 15:51:25 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-16 15:51:25 -0800 |
commit | bb95e815380c85d14afade807ebb2dd227d90b9e (patch) | |
tree | 761de70068dc377291e58f19ef5ebabb7c29450b /activerecord/lib/active_record/connection_adapters | |
parent | 97ca6358c5fbd5458b684d6d46489b7b68c48225 (diff) | |
download | rails-bb95e815380c85d14afade807ebb2dd227d90b9e.tar.gz rails-bb95e815380c85d14afade807ebb2dd227d90b9e.tar.bz2 rails-bb95e815380c85d14afade807ebb2dd227d90b9e.zip |
Adding a deprecation warning for use of the schema_info table.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index 11da84e245..7742f32213 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -1,4 +1,5 @@ require 'active_support/core_ext/array/wrap' +require 'active_support/deprecation/reporting' module ActiveRecord module ConnectionAdapters # :nodoc: @@ -445,6 +446,7 @@ module ActiveRecord si_table = Base.table_name_prefix + 'schema_info' + Base.table_name_suffix if table_exists?(si_table) + ActiveRecord::Deprecation.warn "Usage of the schema table `#{si_table}` is deprecated. Please switch to using `schema_migrations` table" old_version = select_value("SELECT version FROM #{quote_table_name(si_table)}").to_i assume_migrated_upto_version(old_version) |