From 4edd6d6fe92f1fd36a1e6a60c29e0c6c1f8812b0 Mon Sep 17 00:00:00 2001 From: Nick Black Date: Wed, 23 Jan 2008 17:31:51 +0000 Subject: [PATCH 1/1] migration 013 removes tags from nodes and old nodes tables/ 014 does not do anything atm --- db/migrate/013_populate_node_tags_and_remove.rb | 13 +++++++++++++ db/migrate/014_add_version_to_nodes.rb | 10 ++++++++++ 2 files changed, 23 insertions(+) create mode 100644 db/migrate/013_populate_node_tags_and_remove.rb create mode 100644 db/migrate/014_add_version_to_nodes.rb 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 -- 2.43.2