Sha256: dd7a39c0365a3d5993365c87b3f8838a49b34bc7792d245c82dd37e8b06c13db

Contents?: true

Size: 398 Bytes

Versions: 1

Compression:

Stored size: 398 Bytes

Contents

class CreateMessages < ActiveRecord::Migration
  def self.up
    create_table :messages do |t|
      t.references :sender, :polymorphic => true, :null => false
      t.text :subject, :body
      t.string :state, :null => false
      t.datetime :hidden_at
      t.string :type
      t.belongs_to :original_message
      t.timestamps
    end
  end

  def self.down
    drop_table :messages
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
has_messages_huacnlee-0.4.1 lib/generators/has_messages/templates/001_create_messages.rb