Ruby on rails 如何在Rails迁移中为sqlite定义全文索引?
sqlite的以下迁移:Ruby on rails 如何在Rails迁移中为sqlite定义全文索引?,ruby-on-rails,ruby-on-rails-4,sqlite,rails-migrations,Ruby On Rails,Ruby On Rails 4,Sqlite,Rails Migrations,sqlite的以下迁移: class CreateCeDicts < ActiveRecord::Migration def change create_table :ce_dicts do |t| t.string :hant t.string :hans t.string :pinyin t.string :english end add_index :ce_dicts, :hant add_index
class CreateCeDicts < ActiveRecord::Migration
def change
create_table :ce_dicts do |t|
t.string :hant
t.string :hans
t.string :pinyin
t.string :english
end
add_index :ce_dicts, :hant
add_index :ce_dicts, :hans
add_index(:ce_dicts, :english, type: :fulltext)
end
end
给出一个错误:
SQLite3::SQLException:接近全文:语法错误:创建全文
索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引索引
全文如下
如何在Rails迁移中定义