X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/ef7f3d800cbdd49b692df10d312e5fd880e2e938..05fb8b3e00f1c9e3c3a9d28d0f4971e985cdce5a:/db/migrate/020_populate_node_tags_and_remove.rb diff --git a/db/migrate/020_populate_node_tags_and_remove.rb b/db/migrate/020_populate_node_tags_and_remove.rb index 8315cb143..d12ede317 100644 --- a/db/migrate/020_populate_node_tags_and_remove.rb +++ b/db/migrate/020_populate_node_tags_and_remove.rb @@ -1,4 +1,4 @@ -require 'migrate' +require "migrate" class PopulateNodeTagsAndRemove < ActiveRecord::Migration def self.up @@ -10,7 +10,7 @@ class PopulateNodeTagsAndRemove < ActiveRecord::Migration cmd = "db/migrate/020_populate_node_tags_and_remove_helper" src = "#{cmd}.c" if !File.exist?(cmd) || File.mtime(cmd) < File.mtime(src) - system('cc -O3 -Wall `mysql_config --cflags --libs` ' + + system("cc -O3 -Wall `mysql_config --cflags --libs` " + "#{src} -o #{cmd}") || fail end @@ -48,6 +48,7 @@ class PopulateNodeTagsAndRemove < ActiveRecord::Migration if have_nodes execute "LOAD DATA INFILE '#{nodes}' INTO TABLE nodes #{csvopts} (id, latitude, longitude, user_id, visible, timestamp, tile, version)" execute "LOAD DATA INFILE '#{node_tags}' INTO TABLE node_tags #{csvopts} (id, version, k, v)" + execute "LOAD DATA INFILE '#{current_nodes}' INTO TABLE current_nodes #{csvopts} (id, latitude, longitude, user_id, visible, timestamp, tile)" execute "LOAD DATA INFILE '#{current_node_tags}' INTO TABLE current_node_tags #{csvopts} (id, k, v)" end