Skip to content
This repository
Browse code

Adding a deprecation warning for use of the schema_info table.

  • Loading branch information...
commit bb95e815380c85d14afade807ebb2dd227d90b9e 1 parent 97ca635
Aaron Patterson authored
2  activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
... ...
@@ -1,4 +1,5 @@
1 1
 require 'active_support/core_ext/array/wrap'
  2
+require 'active_support/deprecation/reporting'
2 3
 
3 4
 module ActiveRecord
4 5
   module ConnectionAdapters # :nodoc:
@@ -445,6 +446,7 @@ def initialize_schema_migrations_table
445 446
           si_table = Base.table_name_prefix + 'schema_info' + Base.table_name_suffix
446 447
 
447 448
           if table_exists?(si_table)
  449
+            ActiveRecord::Deprecation.warn "Usage of the schema table `#{si_table}` is deprecated. Please switch to using `schema_migrations` table"
448 450
 
449 451
             old_version = select_value("SELECT version FROM #{quote_table_name(si_table)}").to_i
450 452
             assume_migrated_upto_version(old_version)

0 notes on commit bb95e81

Please sign in to comment.
Something went wrong with that request. Please try again.