class MoveToInnodb < ActiveRecord::Migration
@@conv_tables = ['nodes', 'ways', 'way_tags', 'way_nodes',
- 'current_way_nodes', 'relation_members', 'relations',
- 'relation_tags', 'current_relation_tags']
+ 'current_way_tags', 'relation_members',
+ 'relations', 'relation_tags', 'current_relation_tags']
@@ver_tbl = ['nodes', 'ways', 'relations']
@@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
def self.down
+ raise IrreversibleMigration.new
end
end