Class: Muzang::Plugins::Grep::Message::Migration

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/muzang-plugins/muzang-grep.rb

Class Method Summary collapse

Class Method Details

.downObject



37
38
39
# File 'lib/muzang-plugins/muzang-grep.rb', line 37

def self.down
  drop_table :messages
end

.upObject



27
28
29
30
31
32
33
34
35
# File 'lib/muzang-plugins/muzang-grep.rb', line 27

def self.up
  execute(%q{
      CREATE VIRTUAL TABLE messages USING fts4(
        channel VARCHAR(255) NOT NULL,
        user VARCHAR(255) NOT NULL,
        content VARCHAR(2048) NOT NULL,
        created_at DATETIME NOT NULL);
      })
end