Sha256: 8f7b54ce98b2aeec92782a714c5b1ef16d4701465de9c54b6a0cef5114d977e2

Contents?: true

Size: 629 Bytes

Versions: 1

Compression:

Stored size: 629 Bytes

Contents

class <%= migration_class_name %> < ActiveRecord::Migration
  def change
    create_table :ahoy_messages do |t|
      t.string :token

      # user
      t.text :to
      t.integer :user_id
      t.string :user_type

      # optional
      # feel free to remove
      t.string :mailer
      t.text :subject
      t.text :content
      t.string :utm_source
      t.string :utm_medium
      t.string :utm_campaign

      # timestamps
      t.timestamp :sent_at
      t.timestamp :opened_at
      t.timestamp :clicked_at
    end

    add_index :ahoy_messages, [:token]
    add_index :ahoy_messages, [:user_id, :user_type]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ahoy_email-0.2.3 lib/generators/ahoy_email/templates/install.rb