add_concurrent_index:todos,:group_idchange_column_null:todos,:project_id,trueenddefdownreturnunlessgroup_id_exists?remove_foreign_key:todos,column: :group_idremove_index:todos,:group_idifindex_exists?(:todos,:group_id)remove_column:todos,:group_idexecute"DELETE FROM todos WHERE project_id IS NULL"change_column_null:todos,:project_id,falseendprivatedefgroup_id_exists?column_exists?(:todos,:group_id)endend