Fix different behavior between db migrate up/down and redo
The rails db:migrate:redo
command currently has different behavior than running a rails db:migrate:down
followed by rails db:migrate:up
. When running the redo
command, the gitlab:db:clean_structure_sql
task is only run after the down
step, resulting in the final structure.sql
not being stripped of comments etc. Fix the redo
behavior so the final file is properly cleaned of unnecessary data.