<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,5 @@
 &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
-&lt;!DOCTYPE plist PUBLIC &quot;-//Apple Computer//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
+&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
 &lt;plist version=&quot;1.0&quot;&gt;
 &lt;dict&gt;
 	&lt;key&gt;beforeRunningCommand&lt;/key&gt;
@@ -8,10 +8,10 @@
 	&lt;string&gt;RUBYLIB=&quot;$TM_BUNDLE_SUPPORT/lib:$RUBYLIB&quot;
 
 # Find the previous version number from the schema.rb file
-export PREVIOUS=`grep 'Schema\.define' &quot;$TM_PROJECT_DIRECTORY/db/schema.rb&quot; | ruby -e 'print $stdin.read.scan(/\d+/).first.to_i - 1'`
+export CURRENT=`grep 'Schema\.define' &quot;$TM_PROJECT_DIRECTORY/db/schema.rb&quot; | ruby -e 'print $stdin.read.scan(/\d+/).first'`
 
 # Migrate database to the previous version
-&quot;${TM_RUBY:=ruby}&quot; -- &quot;${TM_BUNDLE_SUPPORT}/bin/rake_helper.rb&quot; db:migrate -v VERSION -a $PREVIOUS
+&quot;${TM_RUBY:=ruby}&quot; -- &quot;${TM_BUNDLE_SUPPORT}/bin/rake_helper.rb&quot; db:migrate:down -v VERSION -a $CURRENT
 &lt;/string&gt;
 	&lt;key&gt;input&lt;/key&gt;
 	&lt;string&gt;none&lt;/string&gt;</diff>
      <filename>Commands/Migrate to Previous Version.tmCommand</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2f096485e99f3610da1fbe0573a1f94ce747a57c</id>
    </parent>
  </parents>
  <author>
    <name>Dr Nic Williams</name>
    <email>drnicwilliams@gmail.com</email>
  </author>
  <url>http://github.com/drnic/ruby-on-rails-tmbundle/commit/736304e02abb1ea88f69561700e2bd9a2eedca47</url>
  <id>736304e02abb1ea88f69561700e2bd9a2eedca47</id>
  <committed-date>2009-09-23T12:48:59-07:00</committed-date>
  <authored-date>2009-09-23T12:48:59-07:00</authored-date>
  <message>makes &quot;Migrate to Previous Version&quot; compatible with timestamped migrations [kamk - Kamil Kukura]</message>
  <tree>1e30709dd714cf2977c6ef099680bd8b26470a45</tree>
  <committer>
    <name>Dr Nic Williams</name>
    <email>drnicwilliams@gmail.com</email>
  </committer>
</commit>
