<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -33,12 +33,7 @@ When a user starts your application, the following code should be executed one t
 before any database activities are performed. This will ensure that any new migrations are
 executed before any database queries/statements can be accidently executed on a stale schema.
 
-First connected to your SQLite database:
-
-    FMDatabase* db = [FMDatabase databaseWithPath:@&quot;/tmp/tmp.db&quot;];
-    [db open];
-  
-Then send all your migration subclasses to the manager, which will determine which need to be executed:
+Setup your list of migration subclasses and send them to the manager, which will determine which need to be executed:
 
     NSArray *migrations = [NSArray arrayWithObjects:
         [CreateStudents migration], // 1
@@ -46,7 +41,7 @@ Then send all your migration subclasses to the manager, which will determine whi
         [AddStudentNumberToStudents migration], // 3
         nil
       ];
-    [FmdbMigrationManager executeWithDatabase:db withMigrations:migrations];
+    [FmdbMigrationManager executeForDatabasePath:@&quot;/tmp/tmp.db&quot; withMigrations:migrations];
 
 Note, the `+migration` method is equivalent to `[[[CreateStudents alloc] init] autorelease]` just much shorter. 
 </diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -55,7 +55,7 @@ class TestFmdbMigrationManager &lt; Test::Unit::TestCase
         assert_equal(2, @migration_manager.currentVersion)
       end
       
-      should &quot;have version 2 has largest schema_info version number&quot; do
+      should &quot;have version 2 in schema_info&quot; do
         @results = @db.executeQuery(&quot;select version from schema_info order by version desc&quot;)
         flunk &quot;no schema_info rows (error: #{@db.lastErrorMessage})&quot; unless @results.next?
         assert_equal(2, @results.intForColumn(&quot;version&quot;))
@@ -78,11 +78,32 @@ class TestFmdbMigrationManager &lt; Test::Unit::TestCase
           assert_equal(3, @migration_manager.currentVersion)
         end
         
-        should &quot;have version 3 has largest schema_info version number&quot; do
+        should &quot;have version 3 in schema_info&quot; do
           @results = @db.executeQuery(&quot;select version from schema_info order by version desc&quot;)
           flunk &quot;no schema_info rows (error: #{@db.lastErrorMessage})&quot; unless @results.next?
           assert_equal(3, @results.intForColumn(&quot;version&quot;))
         end
+        
+        context &quot;and go down to specific version 1&quot; do
+          setup do
+            @migration_manager = FmdbMigrationManager.executeForDatabasePath_withMigrations_andMatchVersion(@db_path, @migrations, 1)
+          end
+
+          should_have_table &quot;schema_info&quot;
+          should_have_table &quot;accounts&quot;
+          should_not_have_table &quot;transactions&quot;
+
+          should &quot;have version 1&quot; do
+            assert_equal(1, @migration_manager.currentVersion)
+          end
+
+          should &quot;have version 1 in schema_info&quot; do
+            @results = @db.executeQuery(&quot;select version from schema_info order by version desc&quot;)
+            flunk &quot;no schema_info rows (error: #{@db.lastErrorMessage})&quot; unless @results.next?
+            assert_equal(1, @results.intForColumn(&quot;version&quot;))
+          end
+        end
+        
       end
       
     end</diff>
      <filename>test/test_fmdb_migration_manager.rb</filename>
    </modified>
    <modified>
      <diff>@@ -35,6 +35,15 @@ class Test::Unit::TestCase
     yield if block_given?
   end
 
+  def self.should_not_have_table(table_name)
+    @current_table_name = table_name
+    should &quot;have not table '#{table_name}'&quot; do
+      @results = find_all table_name
+      assert_some_errors(@db)
+      @results.close if @results
+    end
+  end
+
   def self.should_have_column(column_name, table_name = @current_table_name)
     should &quot;have column '#{column_name}' on table '#{table_name}'&quot; do
       @results = find_all table_name</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8c696d0c1c3ef6002c170e9fc1210008ba2ec5c3</id>
    </parent>
  </parents>
  <author>
    <name>Dr Nic Williams</name>
    <email>drnicwilliams@gmail.com</email>
  </author>
  <url>http://github.com/mocra/fmdb-migration-manager/commit/96b5e7e214c0a414d422264198b9ddb9d2b7dcab</url>
  <id>96b5e7e214c0a414d422264198b9ddb9d2b7dcab</id>
  <committed-date>2008-09-09T04:14:07-07:00</committed-date>
  <authored-date>2008-09-09T04:14:07-07:00</authored-date>
  <message>added tests for new executeForDatabasePath:withMigrations:andMatchVersion: command</message>
  <tree>4a4947833e013fb9d4f868c6f971642f10cfb228</tree>
  <committer>
    <name>Dr Nic Williams</name>
    <email>drnicwilliams@gmail.com</email>
  </committer>
</commit>
