Class: CreateWiserChatMessages

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/wiser_chat/install/templates/migration.rb,
lib/generators/wiser_chat/migration/templates/migration.rb

Instance Method Summary collapse

Instance Method Details

#changeObject


2
3
4
5
6
7
8
9
10
# File 'lib/generators/wiser_chat/install/templates/migration.rb', line 2

def change
  create_table :wiser_chat_messages do |t|
    t.references :user, index: true
    t.text :channel
    t.text :content

    t.timestamps null: false
  end
end