Class: CreateNotifyUserUnsubscribes

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/notify_user/install/templates/create_notify_user_unsubscribes.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/generators/notify_user/install/templates/create_notify_user_unsubscribes.rb', line 2

def change
  create_table :notify_user_unsubscribes do |t|
    t.string :type
    t.integer :target_id
    t.string :target_type

    t.integer :group_id
    t.timestamps
  end

  add_index :notify_user_unsubscribes, :group_id
  add_index :notify_user_unsubscribes, :target_id
end