Sha256: c34fc6ede38adcdde24196a0cde6353f446cdd1b605f10ae99489ab9abe7c31a

Contents?: true

Size: 283 Bytes

Versions: 5

Compression:

Stored size: 283 Bytes

Contents

class CreateWiserChatMessages < ActiveRecord::Migration
  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
    add_foreign_key :messages, :users
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wiser_chat-0.1.4 lib/generators/wiser_chat/migration/templates/migration.rb
wiser_chat-0.1.3 lib/generators/wiser_chat/migration/templates/migration.rb
wiser_chat-0.1.2 lib/generators/wiser_chat/migration/templates/migration.rb
wiser_chat-0.1.1 lib/generators/wiser_chat/migration/templates/migration.rb
wiser_chat-0.1.0 lib/generators/wiser_chat/migration/templates/migration.rb