1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Use AR::SchemaMigration.table_exists? call instead of longish AR::Base...etc,etc

This commit is contained in:
Viktar Basharymau 2014-06-27 20:24:38 +03:00
parent 68b7e7ab97
commit 3852f2d408

View file

@ -93,7 +93,7 @@ db_namespace = namespace :db do
desc 'Display status of migrations'
task :status => [:environment, :load_config] do
unless ActiveRecord::Base.connection.table_exists?(ActiveRecord::Migrator.schema_migrations_table_name)
unless ActiveRecord::SchemaMigration.table_exists?
abort 'Schema migrations table does not exist yet.'
end
db_list = ActiveRecord::SchemaMigration.normalized_versions