]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/014_move_to_innodb.rb
api06: Fix the version-numbers-on-current-tables migration: We want the rows
[rails.git] / db / migrate / 014_move_to_innodb.rb
index 57065a594fa303a891147b5e16045f4bc468f5a9..da6442daba1fc334be9cffe675927b715ce53261 100644 (file)
@@ -20,7 +20,7 @@ class MoveToInnodb < ActiveRecord::Migration
     @@ver_tbl.each { |tbl|
       add_column "current_#{tbl}", "version", :bigint, :limit => 20, :null => false
       execute "UPDATE current_#{tbl} SET version = " +
-       "(SELECT max(version)+1 FROM #{tbl} WHERE #{tbl}.id = current_#{tbl}.id)"
+       "(SELECT max(version) FROM #{tbl} WHERE #{tbl}.id = current_#{tbl}.id)"
     }
   end