diff options
author | Viktar Basharymau <viktar.basharymau@thehamon.com> | 2014-06-26 20:08:19 +0300 |
---|---|---|
committer | Viktar Basharymau <viktar.basharymau@thehamon.com> | 2014-06-27 17:46:48 +0300 |
commit | e75bdcb4d8698947ed228eeacd2d3f23eaad0f6b (patch) | |
tree | c94e73c478ba83ee245f5bb3929472c3e73c4f2a /activerecord | |
parent | c4918eefdf94320b3a1263f90456f290bd89a723 (diff) | |
download | rails-e75bdcb4d8698947ed228eeacd2d3f23eaad0f6b.tar.gz rails-e75bdcb4d8698947ed228eeacd2d3f23eaad0f6b.tar.bz2 rails-e75bdcb4d8698947ed228eeacd2d3f23eaad0f6b.zip |
db:migrate:status refactoring: Rewrite hand-crafted SQL query with ActiveRecord#pluck
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index fb890ed709..c82a56718a 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -96,7 +96,7 @@ db_namespace = namespace :db do unless ActiveRecord::Base.connection.table_exists?(ActiveRecord::Migrator.schema_migrations_table_name) abort 'Schema migrations table does not exist yet.' end - db_list = ActiveRecord::Base.connection.select_values("SELECT version FROM #{ActiveRecord::Migrator.schema_migrations_table_name}") + db_list = ActiveRecord::SchemaMigration.pluck(:version) db_list.map! { |version| ActiveRecord::SchemaMigration.normalize_migration_number(version) } file_list = |