Class: CreateDigestEmailDeliveries
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateDigestEmailDeliveries
- Defined in:
- lib/generators/digest_notifier/templates/create_digest_email_deliveries.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/generators/digest_notifier/templates/create_digest_email_deliveries.rb', line 17 def self.down remove_index :digest_email_deliveries, :digest_email_item_id remove_index :digest_email_deliveries, :receiver_id remove_index :digest_email_deliveries, :sent_at drop_table :digest_email_deliveries end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/generators/digest_notifier/templates/create_digest_email_deliveries.rb', line 2 def self.up create_table :digest_email_deliveries do |t| t.integer :digest_email_item_id t.integer :receiver_id t.string :receiver_email t.datetime :sent_at t. end add_index :digest_email_deliveries, :digest_email_item_id add_index :digest_email_deliveries, :receiver_id add_index :digest_email_deliveries, :sent_at end |