Skip to content

Commit

Permalink
Use ActiveRecord::Migrator.schema_migrations_table_name instead of ha…
Browse files Browse the repository at this point in the history
…rdcoding "schema_migrations"

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information
amatsuda authored and jeremy committed Jun 28, 2010
1 parent 25215d7 commit 0e5d7c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/railties/databases.rake
Expand Up @@ -175,7 +175,7 @@ namespace :db do
desc "Display status of migrations" desc "Display status of migrations"
task :status => :environment do task :status => :environment do
config = ActiveRecord::Base.configurations[Rails.env || 'development'] config = ActiveRecord::Base.configurations[Rails.env || 'development']
db_list = ActiveRecord::Base.connection.select_values("SELECT version FROM schema_migrations") db_list = ActiveRecord::Base.connection.select_values("SELECT version FROM #{ActiveRecord::Migrator.schema_migrations_table_name}")
file_list = [] file_list = []
Dir.foreach(File.join(Rails.root, 'db', 'migrate')) do |file| Dir.foreach(File.join(Rails.root, 'db', 'migrate')) do |file|
# only files matching "20091231235959_some_name.rb" pattern # only files matching "20091231235959_some_name.rb" pattern
Expand Down

0 comments on commit 0e5d7c6

Please sign in to comment.