From de93fe7707f9222f045561cb96227352a57ebac2 Mon Sep 17 00:00:00 2001 From: Nick Black Date: Wed, 23 Jan 2008 17:47:14 +0000 Subject: [PATCH] created a temporary old nodes table to add version --- db/migrate/014_create_temp_old_nodes.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 db/migrate/014_create_temp_old_nodes.rb diff --git a/db/migrate/014_create_temp_old_nodes.rb b/db/migrate/014_create_temp_old_nodes.rb new file mode 100644 index 000000000..7b768425c --- /dev/null +++ b/db/migrate/014_create_temp_old_nodes.rb @@ -0,0 +1,24 @@ +class CreateTempOldNodes < ActiveRecord::Migration + def self.up + + create_table "temp_nodes", myisam_table do |t| + t.column "id", :bigint, :limit => 64 + t.column "version", :bigint, :limit => 20, :default => 0, :null => false + t.column "latitude", :double + t.column "longitude", :double + t.column "user_id", :bigint, :limit => 20 + t.column "visible", :boolean + t.column "timestamp", :datetime + 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" + + end + + def self.down + drop_table :temp_nodes + end +end -- 2.43.2