0
在安裝模糊寶石我最近跑了這種遷移:如何扭轉的擴展遷移
class AddTrigramsModel < ActiveRecord::Migration
extend Fuzzily::Migration
end
從看着我schema.rb文件,它看起來像這樣移植的效果是:
create_table "trigrams", :force => true do |t|
t.string "trigram", :limit => 3
t.integer "score", :limit => 2
t.integer "owner_id"
t.string "owner_type"
t.string "fuzzy_field"
end
add_index "trigrams", ["owner_id", "owner_type", "fuzzy_field", "trigram", "score"], :name => "index_for_match"
add_index "trigrams", ["owner_id", "owner_type"], :name => "index_by_owner"
不確定最簡單的方法是刪除表格卦,還是有更合適的方法?我假設索引將在刪除表時被刪除?