Class: CreateCancelledSubscriptionsTable

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/tldr/templates/migration/create_cancelled_subscriptions_table.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
# File 'lib/generators/tldr/templates/migration/create_cancelled_subscriptions_table.rb', line 2

def change
  create_table :cancelled_subscriptions do |t|
    t.integer :subscriber_id, null: false
    t.string :email_name, null: false

    t.timestamps
  end

  add_index :cancelled_subscriptions, [:subscriber_id, :email_name]
end