Class: CreateChat

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/chat/install/templates/create_chat.rb

Class Method Summary collapse

Class Method Details

.downObject



13
14
15
16
17
# File 'lib/generators/chat/install/templates/create_chat.rb', line 13

def self.down
  drop_table :chat_conversations
  drop_table :chat_sessions
  drop_table :chat_messages
end

.upObject



4
5
6
7
8
9
10
11
# File 'lib/generators/chat/install/templates/create_chat.rb', line 4

def self.up
  create_table :chat_conversations do |t|
    t.timestamps
  end

  create_sessions
  create_messages
end