Sha256: 223f1fb1a4c6982055be53a1cda2abb35b41d7a2138f402697b39556e54138e1
Contents?: true
Size: 1.16 KB
Versions: 16
Compression:
Stored size: 1.16 KB
Contents
class CreateEmails < ActiveRecord::Migration def self.up create_table :emails, :force => true do |t| t.string :imap_message_id, :null => false # IMAP internal message identifier. t.references :user # User who created th email. t.references :mediator, :polymorphic => true # Identifies where the email is attached to. t.string :sent_from, :null => false # From: t.string :sent_to, :null => false # To: t.string :cc # Cc: t.string :bcc # Bcc: t.string :subject # Subject: t.text :body # Body: t.text :header # Raw header as received from IMAP server. t.datetime :sent_at # Time the message was sent. t.datetime :received_at # Time the message was received. t.datetime :deleted_at t.timestamps end add_index :emails, [ :mediator_id, :mediator_type ] end def self.down drop_table :emails end end
Version data entries
16 entries across 16 versions & 1 rubygems