Sha256: 39109f0d5be2f7b67f6a291ac14e6dfa66d104ef63d4d7e0364cdaff8ff298a8
Contents?: true
Size: 522 Bytes
Versions: 18
Compression:
Stored size: 522 Bytes
Contents
class CreateSearchText < ActiveRecord::Migration def self.up create_table :search_texts, :options => 'ENGINE=MyISAM' do |t| t.integer :source_id t.string :source_type t.boolean :stale t.text :words end add_index :search_texts, [:source_type, :source_id] # for updates add_index :search_texts, [:source_type, :stale] # for refreshs execute 'CREATE FULLTEXT INDEX fulltext_index_words ON search_texts (words)' end def self.down drop_table :search_texts end end
Version data entries
18 entries across 18 versions & 1 rubygems