Sha256: d307a6bd143024c65d410af49de5adb0239268d7993aabb5393b51a77dd55404

Contents?: true

Size: 671 Bytes

Versions: 34

Compression:

Stored size: 671 Bytes

Contents

# This migration comes from message_train (originally 20151124000820)
class CreateMessageTrainUnsubscribes < ActiveRecord::Migration
  def change
    create_table :message_train_unsubscribes do |t|
      t.references :recipient, polymorphic: true
      t.references :from, polymorphic: true

      t.timestamps null: false
    end

    add_index :message_train_unsubscribes, [:recipient_type, :recipient_id], name: :unsubscribe_recipient
    add_index :message_train_unsubscribes, [:from_type, :from_id], name: :unsubscribe_from
    add_index :message_train_unsubscribes, [:recipient_type, :recipient_id, :from_type, :from_id], name: :unsubscribe, unique: true
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
message_train-0.7.6 spec/dummy/db/migrate/20160207190409_create_message_train_unsubscribes.message_train.rb
message_train-0.7.5 spec/dummy/db/migrate/20160207190409_create_message_train_unsubscribes.message_train.rb
message_train-0.7.3 spec/dummy/db/migrate/20160207190409_create_message_train_unsubscribes.message_train.rb
message_train-0.7.2 spec/dummy/db/migrate/20160207190409_create_message_train_unsubscribes.message_train.rb
message_train-0.7.1 spec/dummy/db/migrate/20160207190409_create_message_train_unsubscribes.message_train.rb
message_train-0.6.17 spec/dummy/db/migrate/20160207190409_create_message_train_unsubscribes.message_train.rb
message_train-0.6.16 spec/dummy/db/migrate/20160207190409_create_message_train_unsubscribes.message_train.rb
message_train-0.6.15 spec/dummy/db/migrate/20160207190409_create_message_train_unsubscribes.message_train.rb
message_train-0.6.14 spec/dummy/db/migrate/20160207190409_create_message_train_unsubscribes.message_train.rb
message_train-0.6.13 spec/dummy/db/migrate/20160207190409_create_message_train_unsubscribes.message_train.rb
message_train-0.6.12 spec/dummy/db/migrate/20160207190409_create_message_train_unsubscribes.message_train.rb
message_train-0.6.11 spec/dummy/db/migrate/20160207190409_create_message_train_unsubscribes.message_train.rb
message_train-0.6.10 spec/dummy/db/migrate/20160207190409_create_message_train_unsubscribes.message_train.rb
message_train-0.6.9 spec/dummy/db/migrate/20160207190409_create_message_train_unsubscribes.message_train.rb
message_train-0.6.8 spec/dummy/db/migrate/20160207190409_create_message_train_unsubscribes.message_train.rb
message_train-0.6.7 spec/dummy/db/migrate/20160207190409_create_message_train_unsubscribes.message_train.rb
message_train-0.6.6 spec/dummy/db/migrate/20160207190409_create_message_train_unsubscribes.message_train.rb
message_train-0.6.5 spec/dummy/db/migrate/20160207190409_create_message_train_unsubscribes.message_train.rb
message_train-0.6.4 spec/dummy/db/migrate/20160207190409_create_message_train_unsubscribes.message_train.rb
message_train-0.6.3 spec/dummy/db/migrate/20160207190409_create_message_train_unsubscribes.message_train.rb