Fix ConvertClosedToStateInMergeRequest migration
Created by: dmedvinsky
It was MySQL only. Running on PostgreSQL was resulting in:
== ConvertClosedToStateInMergeRequest: migrating =============================
rake aborted!
An error has occurred, this and all later migrations canceled:
PG::Error: ERROR: operator does not exist: boolean = integer
LINE 1: ...erge_requests" SET state = 'merged' WHERE (closed = 1 AND me...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
: UPDATE "merge_requests" SET state = 'merged' WHERE (closed = 1 AND merged = 1)
Replacing 0
with false
and 1
with true
should make it both
PostgreSQL and MySQL compatible.