]> git.openstreetmap.org Git - rails.git/blob - db/migrate/012_create_node_tags.rb
move migrations around
[rails.git] / db / migrate / 012_create_node_tags.rb
1 class CreateNodeTags < ActiveRecord::Migration
2   def self.up
3     create_table "current_node_tags", myisam_table do |t|
4       t.column "id",          :bigint, :limit => 64,                 :null => false
5       t.column "sequence_id", :bigint, :limit => 11,                 :null => false
6       t.column "k",           :string,              :default => "", :null => false
7       t.column "v",           :string,              :default => "", :null => false
8     end
9
10     add_primary_key "current_node_tags", ["id", "sequence_id"]
11        
12     execute "CREATE FULLTEXT INDEX `current_node_tags_v_idx` ON `current_node_tags` (`v`)"
13   end
14
15   def self.down
16     drop_table :current_node_tags
17   end
18 end