docbrown/db/migrate/20170719211212_create_ahoy_messages.rb
leewynne 5b50d52b5f Replaced hard coded AWS region in carrierwave.rb and sitemaps.rb. Updated legacy migration files to include pre rails 5 version (this resolved new instances on Heroku) (#4874) [deploy]
* missing rails version 4.2 added to pre 5 migrations

* updated carrierwave.rb and sitemap.rb with AWS_DEFAULT_REGION
2019-11-22 09:07:59 -05:00

32 lines
690 B
Ruby

class CreateAhoyMessages < ActiveRecord::Migration[4.2]
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
# 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]
add_index :ahoy_messages, [:user_id, :user_type]
end
end