Permalink
Browse files

Adding a deprecation warning for use of the schema_info table.

  • Loading branch information...
1 parent 97ca635 commit bb95e815380c85d14afade807ebb2dd227d90b9e @tenderlove tenderlove committed Nov 16, 2011
View
2 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 @@ def initialize_schema_migrations_table
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)

0 comments on commit bb95e81

Please sign in to comment.