]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/012_create_old_node_tags.rb
adds two migrations to create old_node_tags and node_tags table and indexes. Does...
[rails.git] / db / migrate / 012_create_old_node_tags.rb
diff --git a/db/migrate/012_create_old_node_tags.rb b/db/migrate/012_create_old_node_tags.rb
new file mode 100644 (file)
index 0000000..329636d
--- /dev/null
@@ -0,0 +1,19 @@
+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 "sequence_id", :bigint, :limit => 11
+      t.column "k",       :string
+      t.column "v",       :string
+      t.column "version", :bigint,  :limit => 20
+    end
+
+    add_index "node_tags", ["version"], :name => "node_tags_id_version_idx"
+    add_primary_key "node_tags", ["id", "version", "sequence_id"]
+
+  end
+
+  def self.down
+    drop_table :node_tags
+  end
+end