mirror of
https://github.com/discourse/discourse.git
synced 2025-02-05 19:11:13 +00:00
41e19adb0d
We don't actually use the reminder_type for bookmarks anywhere; we are just storing it. It has no bearing on the UI. It used to be relevant with the at_desktop bookmark reminders (see fa572d3a7a6a3e107fdbc5f00e04d2bb990ab77d) This commit marks the column as readonly, ignores it, and removes the index, and it will be dropped in a later PR. Some plugins are relying on reminder_type partially so some stubs have been left in place to avoid errors.
12 lines
379 B
Ruby
12 lines
379 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AddForTopicToBookmarks < ActiveRecord::Migration[6.1]
|
|
def change
|
|
add_column :bookmarks, :for_topic, :boolean, default: false, null: false
|
|
add_index :bookmarks, [:user_id, :post_id, :for_topic], unique: true
|
|
if index_exists?(:bookmarks, [:user_id, :post_id])
|
|
remove_index :bookmarks, [:user_id, :post_id]
|
|
end
|
|
end
|
|
end
|