From b95e10ac8fc8a92042fcc14ef8fb8cc0e7afa8d0 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 7 Apr 2008 23:09:56 +0000 Subject: [PATCH 1/1] Make a copy of the rails code for the node tag splitting project, and remove the associated migrations from the other branches. --- db/migrate/012_create_node_tags.rb | 18 -------------- db/migrate/013_create_old_node_tags.rb | 17 ------------- .../014_populate_node_tags_and_remove.rb | 13 ---------- db/migrate/015_create_temp_old_nodes.rb | 24 ------------------- 4 files changed, 72 deletions(-) delete mode 100644 db/migrate/012_create_node_tags.rb delete mode 100644 db/migrate/013_create_old_node_tags.rb delete mode 100644 db/migrate/014_populate_node_tags_and_remove.rb delete mode 100644 db/migrate/015_create_temp_old_nodes.rb diff --git a/db/migrate/012_create_node_tags.rb b/db/migrate/012_create_node_tags.rb deleted file mode 100644 index 316602d69..000000000 --- a/db/migrate/012_create_node_tags.rb +++ /dev/null @@ -1,18 +0,0 @@ -class CreateNodeTags < ActiveRecord::Migration - def self.up - create_table "current_node_tags", myisam_table do |t| - t.column "id", :bigint, :limit => 64, :null => false - t.column "sequence_id", :bigint, :limit => 11, :null => false - t.column "k", :string, :default => "", :null => false - t.column "v", :string, :default => "", :null => false - end - - add_primary_key "current_node_tags", ["id", "sequence_id"] - - execute "CREATE FULLTEXT INDEX `current_node_tags_v_idx` ON `current_node_tags` (`v`)" - end - - def self.down - drop_table :current_node_tags - end -end diff --git a/db/migrate/013_create_old_node_tags.rb b/db/migrate/013_create_old_node_tags.rb deleted file mode 100644 index aeb5abd4c..000000000 --- a/db/migrate/013_create_old_node_tags.rb +++ /dev/null @@ -1,17 +0,0 @@ -class CreateOldNodeTags < ActiveRecord::Migration - def self.up - create_table "node_tags", myisam_table do |t| - t.column "id", :bigint, :limit => 64, :default => 0, :null => false - t.column "version", :bigint, :limit => 20, :null => false - t.column "sequence_id", :bigint, :limit => 11, :null => false - t.column "k", :string, :null => false - t.column "v", :string, :null => false - end - - add_primary_key "node_tags", ["id", "version", "sequence_id"] - end - - def self.down - drop_table :node_tags - end -end diff --git a/db/migrate/014_populate_node_tags_and_remove.rb b/db/migrate/014_populate_node_tags_and_remove.rb deleted file mode 100644 index 7583c6618..000000000 --- a/db/migrate/014_populate_node_tags_and_remove.rb +++ /dev/null @@ -1,13 +0,0 @@ -class PopulateNodeTagsAndRemove < ActiveRecord::Migration - def self.up - #rake import - #commented out to stop people from breaking their db -# 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/015_create_temp_old_nodes.rb b/db/migrate/015_create_temp_old_nodes.rb deleted file mode 100644 index 60edb8406..000000000 --- a/db/migrate/015_create_temp_old_nodes.rb +++ /dev/null @@ -1,24 +0,0 @@ -class CreateTempOldNodes < ActiveRecord::Migration - def self.up - create_table "temp_nodes", myisam_table do |t| - t.column "id", :bigint, :limit => 64, :null => false - t.column "version", :bigint, :limit => 20, :null => false - t.column "latitude", :double, :null => false - t.column "longitude", :double, :null => false - t.column "user_id", :bigint, :limit => 20, :null => false - t.column "visible", :boolean, :null => false - t.column "timestamp", :datetime, :null => false - t.column "tile", :integer, :null => false - end - - add_primary_key "temp_nodes", ["id", "version"] - add_index "temp_nodes", ["timestamp"], :name => "temp_nodes_timestamp_idx" - add_index "temp_nodes", ["tile"], :name => "temp_nodes_tile_idx" - - change_column "temp_nodes", "version", :bigint, :limit => 20, :null => false, :options => "AUTO_INCREMENT" - end - - def self.down - drop_table :temp_nodes - end -end -- 2.39.5