Class: AddMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/templates/chat/migration-models/add_message.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/templates/chat/migration-models/add_message.rb', line 2

def change
  create_table :messages do |t|
    t.belongs_to :user
    t.belongs_to :chat
    t.string   	 :content
    t.string   	 :image
    t.integer  	 :image_orientation
    t.string   	 :message_type
    t.boolean  	 :sent
    t.boolean  	 :read
    t.timestamps
  end
end