Skip to content

Fix merge_request_diffs migrations for postgresql

Created by: skv-headless

Last migrations doesn't work in postgresql

==  RemoveMRdiffFields: reverting =============================================
-- add_column(:merge_requests, :st_commits, :text, {:null=>true, :limit=>2147483647})
   -> 0.0012s
-- add_column(:merge_requests, :st_diffs, :text, {:null=>true, :limit=>2147483647})
   -> 0.0006s
-- execute("UPDATE merge_requests mr, merge_request_diffs md SET mr.st_commits = md.st_commits WHERE md.merge_request_id = mr.id")
rake aborted!
An error has occurred, this and all later migrations canceled:

PG::Error: ERROR:  syntax error at or near ","
LINE 1: UPDATE merge_requests mr, merge_request_diffs md SET mr.st_c...
                                ^
: UPDATE merge_requests mr, merge_request_diffs md SET mr.st_commits = md.st_commits WHERE md.merge_request_id = mr.id/home/skv/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `exec'

Merge request reports

Loading