Sha256: 082610f4e7a248dc5fde93ccf6c7271c28f3c52104ffcdba91e2b03c0b91dd52
Contents?: true
Size: 608 Bytes
Versions: 4
Compression:
Stored size: 608 Bytes
Contents
class CreateMessagesTable < ActiveRecord::Migration def self.up create_table :messages do |t| t.text :body t.string :attachment t.references :received_messageable, :polymorphic => true t.references :sent_messageable, :polymorphic => true t.boolean :opened, :default => false t.boolean :recipient_delete, :default => false t.boolean :sender_delete, :default => false t.timestamps end add_index :messages, [:sent_messageable_id, :received_messageable_id], :name => "acts_as_chattable_ids" end def self.down drop_table :messages end end
Version data entries
4 entries across 4 versions & 1 rubygems