Why: Budget Investment's valuators need to be able to comment on investments without making those comments public. We need a way to clearly make a distinction to avoid "leaking" internal valuation comments. How: Adding a boolean `valuation` attribute defaulted to false to the Comments table, and index on it with concurrent algorithm as explained at https://robots.thoughtbot.com/how-to-create-postgres-indexes-concurrently-in The name `valuation` was chosen instead of `internal` because of the more specific meaning as well as avoiding a collision with existing internal_comments attribute on Budget::Investment model (soon to be deprecated & removed)
6 lines
145 B
Ruby
6 lines
145 B
Ruby
class AddValuationFlagToComments < ActiveRecord::Migration
|
|
def change
|
|
add_column :comments, :valuation, :boolean, default: false
|
|
end
|
|
end
|