lib/automigration/migrator.rb in automigration-1.1.0 vs lib/automigration/migrator.rb in automigration-1.1.1

- old
+ new

@@ -55,10 +55,10 @@ # clean migration table if connection.table_exists?('schema_migrations') && !@@migration_paths.empty? sql = "SELECT version FROM schema_migrations;" - migrations_in_db = connection.execute(sql).map{|row| row['version']} + migrations_in_db = connection.execute(sql).map{|row| row.is_a?(Hash) ? row['version'] : row.first } current_migrations = [] @@migration_paths.each do |path| Dir[File.expand_path("*.rb", path)].each do |m_file| File.basename(m_file) =~ /(\d{14})/ current_migrations << $1