Sha256: 4e4a2307ba5c7cc6193148d6054a92090181dcb9e3680979555068ff44fd2167
Contents?: true
Size: 719 Bytes
Versions: 12
Compression:
Stored size: 719 Bytes
Contents
class CreateMessagesTable < ActiveRecord::Migration def self.up create_table :<%= table_name %> do |t| t.string :topic t.text :body 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 # ancestry t.string :ancestry end add_index :<%= table_name %>, [:sent_messageable_id, :received_messageable_id], :name => "acts_as_messageable_ids" add_index :<%= table_name %>, :ancestry end def self.down drop_table :<%= table_name %> end end
Version data entries
12 entries across 12 versions & 1 rubygems