]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/way.rb
adds two migrations to create old_node_tags and node_tags table and indexes. Does...
[rails.git] / app / models / way.rb
index ff2e643709b24bf2a2c9a423b208e52701e6a812..1fe628171c9f91eefc47c050e70efb773e6715b7 100644 (file)
@@ -177,14 +177,13 @@ class Way < ActiveRecord::Base
 
       WayNode.delete_all(['id = ?', self.id])
 
 
       WayNode.delete_all(['id = ?', self.id])
 
-      i = 1
+      sequence = 1
       nds.each do |n|
         nd = WayNode.new
       nds.each do |n|
         nd = WayNode.new
-        nd.id = self.id
+        nd.id = [self.id, sequence]
         nd.node_id = n
         nd.node_id = n
-        nd.sequence_id = i
         nd.save!
         nd.save!
-        i += 1
+        sequence += 1
       end
     end
 
       end
     end