<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -53,11 +53,12 @@ class Engines::Plugin::Migrator &lt; ActiveRecord::Migrator
   end
   
   def migrated(plugin=current_plugin)
-    ActiveRecord::Base.connection.select_values(&lt;&lt;-ESQL
+    current = ActiveRecord::Base.connection.select_value(&lt;&lt;-ESQL
       SELECT version FROM #{self.class.schema_info_table_name}
       WHERE plugin_name = '#{plugin.name}'
     ESQL
-    ).map(&amp;:to_i).sort - [0]
+    ).to_i
+    current ? (1..current).to_a : []
   end
   
   # Sets the version of the plugin in Engines::Plugin::Migrator.current_plugin to</diff>
      <filename>lib/engines/plugin/migrator.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>755efd571d963929fbeb6843aaa140abf6bee2e4</id>
    </parent>
  </parents>
  <author>
    <name>James Adam</name>
    <email>james@lazyatom.com</email>
  </author>
  <url>http://github.com/azimux/engines/commit/14fd63fba239b835e822df9435dcc99dbcf2ee58</url>
  <id>14fd63fba239b835e822df9435dcc99dbcf2ee58</id>
  <committed-date>2008-06-10T08:41:08-07:00</committed-date>
  <authored-date>2008-06-10T08:41:08-07:00</authored-date>
  <message>Since rails tracks *all* the migrated migrations now, we need to simulate that for the legacy numeric migrations we're using at the moment. So, find the current version and then create an array from 1 up to that number.</message>
  <tree>52010c73eaae3400300857bba4864ea9bf331690</tree>
  <committer>
    <name>James Adam</name>
    <email>james@lazyatom.com</email>
  </committer>
</commit>
