diff --git a/db/migrate/20190723152256_delete_contents_is_null_for_challenge_answers.rb b/db/migrate/20190723152256_delete_contents_is_null_for_challenge_answers.rb new file mode 100644 index 000000000..a85152894 --- /dev/null +++ b/db/migrate/20190723152256_delete_contents_is_null_for_challenge_answers.rb @@ -0,0 +1,6 @@ +class DeleteContentsIsNullForChallengeAnswers < ActiveRecord::Migration[5.2] + def change + contents = ChallengeAnswer.where("contents = ''") + contents.delete_all + end +end