X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/5b33f3f8e31c62bc3e5db1d5b120533c3afdde68..8ad1ce97983a5d4fb86ccb8ee4cd640a76f95255:/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 0fd1dc564..6366a33ce 100644 --- a/db/migrate/020_populate_node_tags_and_remove.rb +++ b/db/migrate/020_populate_node_tags_and_remove.rb @@ -1,6 +1,6 @@ require "migrate" -class PopulateNodeTagsAndRemove < ActiveRecord::Migration +class PopulateNodeTagsAndRemove < ActiveRecord::Migration[5.0] def self.up have_nodes = select_value("SELECT count(*) FROM current_nodes").to_i.nonzero? @@ -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}") || raise end @@ -38,8 +38,8 @@ class PopulateNodeTagsAndRemove < ActiveRecord::Migration create_table :node_tags, :id => false do |t| t.column :id, :bigint, :null => false t.column :version, :bigint, :null => false - t.column :k, :string, :default => "", :null => false - t.column :v, :string, :default => "", :null => false + t.column :k, :string, :default => "", :null => false + t.column :v, :string, :default => "", :null => false end # now get the data back