docbrown/db/migrate/20190531085252_remove_notifications_unique_index.rb
Anna Buianova 2c05bbc0c1 Change notifications unique indexes #2525 (#3012)
* Notifications unique indexes that take null values into account

* Specify import options for reaction notifications according to the indexes

* Fix specs: notifications have either user_id or organization_id

* Create notifications indexes concurrently
2019-06-13 15:17:50 -04:00

7 lines
349 B
Ruby

class RemoveNotificationsUniqueIndex < ActiveRecord::Migration[5.2]
def change
remove_index :notifications, column: %i[user_id organization_id notifiable_id notifiable_type action],
unique: true,
name: "index_notifications_on_user_organization_notifiable_and_action"
end
end