post disapprovals: refactor disapproval reasons.

* Factor out reasons into a constant
* Change column default and eliminate unused `legacy` reason.
This commit is contained in:
evazion
2020-04-03 15:57:29 -05:00
parent 3e792019e5
commit fde42022c0
9 changed files with 20 additions and 15 deletions

View File

@@ -0,0 +1,6 @@
class ChangeReasonDefaultOnPostDisapprovals < ActiveRecord::Migration[6.0]
def change
change_column_null :post_disapprovals, :reason, false
change_column_default :post_disapprovals, :reason, from: "legacy", to: nil
end
end