Class: RemoveDeviceIdFromContacts
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- RemoveDeviceIdFromContacts
- Defined in:
- lib/generators/install_contact_sync/templates/remove_device_id_from_contacts.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 |
# File 'lib/generators/install_contact_sync/templates/remove_device_id_from_contacts.rb', line 2 def change remove_column :contacts, :device_id, :string, default: "" remove_index :contacts, name: "unique_device_contact" add_index :contacts, [:user_id, :record_id], unique: true end |