Add a non-null constraint to noteable_type column
There are some orphaned discussion notes in the production database for .com
with noteable_type/noteable_id=NULL
.
- Introduce a non-null constraint for
noteable_type
. - Create an index to help locating and removing the orphaned notes.
Edited by euko