lib/generators/mailkick/templates/install.rb in mailkick-0.2.1 vs lib/generators/mailkick/templates/install.rb in mailkick-0.3.0
- old
+ new
@@ -1,16 +1,14 @@
class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version %>
def change
create_table :mailkick_opt_outs do |t|
t.string :email
- t.integer :user_id
- t.string :user_type
+ t.references :user, polymorphic: true
t.boolean :active, null: false, default: true
t.string :reason
t.string :list
t.timestamps
end
add_index :mailkick_opt_outs, :email
- add_index :mailkick_opt_outs, [:user_id, :user_type]
end
end