Sha256: dad76d6f22b2a9337aa656bf997a3fd4718f92d5d2a460a1fcd32ec14a893fd7
Contents?: true
Size: 1.13 KB
Versions: 13
Compression:
Stored size: 1.13 KB
Contents
# frozen_string_literal: true class CreateEmails < ActiveRecord::Migration[4.2] 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 the 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, %i[mediator_id mediator_type] end def self.down drop_table :emails end end
Version data entries
13 entries across 13 versions & 1 rubygems