From: Nick Black Date: Wed, 23 Jan 2008 17:31:51 +0000 (+0000) Subject: migration 013 removes tags from nodes and old nodes tables/ 014 does not do anything atm X-Git-Tag: live~7916 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/4edd6d6fe92f1fd36a1e6a60c29e0c6c1f8812b0?hp=8d2a4ee67a765df8d95062de97cb53ad07f7f2ce migration 013 removes tags from nodes and old nodes tables/ 014 does not do anything atm --- diff --git a/db/migrate/013_populate_node_tags_and_remove.rb b/db/migrate/013_populate_node_tags_and_remove.rb new file mode 100644 index 000000000..f3642316e --- /dev/null +++ b/db/migrate/013_populate_node_tags_and_remove.rb @@ -0,0 +1,13 @@ +class PopulateNodeTagsAndRemove < ActiveRecord::Migration + def self.up + + #rake import + remove_column :nodes, :tags + remove_column :current_nodes, :tags + end + + def self.down + add_column :nodes, "tags", :text, :default => "", :null => false + add_column :current_nodes, "tags", :text, :default => "", :null => false + end +end diff --git a/db/migrate/014_add_version_to_nodes.rb b/db/migrate/014_add_version_to_nodes.rb new file mode 100644 index 000000000..8afa54875 --- /dev/null +++ b/db/migrate/014_add_version_to_nodes.rb @@ -0,0 +1,10 @@ +class AddVersionToNodes < ActiveRecord::Migration + def self.up + add_column :nodes, :version, :bigint, :limit => 20, :default => 0, :null => false + end + + def self.down + remove_column :nodes, :version + add_index "nodes", ["id"], :name => "nodes_uid_idx" + end +end