Sha256: 69bb311f4717fc3c16318b356263e615bfb3e4987e7e183a5be6e6a54cb0590c

Contents?: true

Size: 670 Bytes

Versions: 2

Compression:

Stored size: 670 Bytes

Contents

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

      # user
      t.text :to
      t.references :user, polymorphic: true

      # optional - feel free to remove
      t.string :mailer
      t.text :subject
      # t.text :content

      # optional
      # t.string :utm_source
      # t.string :utm_medium
      # t.string :utm_term
      # t.string :utm_content
      # t.string :utm_campaign

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

    add_index :ahoy_messages, [:token]
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ahoy_email-0.5.2 lib/generators/ahoy_email/templates/install.rb
ahoy_email-0.5.1 lib/generators/ahoy_email/templates/install.rb