diff options
author | skv-headless <skv-headless@yandex.ru> | 2014-01-27 16:37:00 +0400 |
---|---|---|
committer | skv-headless <skv-headless@yandex.ru> | 2014-01-27 18:50:53 +0400 |
commit | 4125de5ef1c694f65b038b4a4b17de7adcdeef78 (patch) | |
tree | 7513e083b8e377470ef41c7edd8fdd3bf797abda /db/migrate/20140122114406_migrate_mr_diffs.rb | |
parent | 5221dbfee74e48f379bc06b2848a64243a76270c (diff) |
Fix merge_request_diffs migrations for postgresql
Diffstat (limited to 'db/migrate/20140122114406_migrate_mr_diffs.rb')
-rw-r--r-- | db/migrate/20140122114406_migrate_mr_diffs.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/db/migrate/20140122114406_migrate_mr_diffs.rb b/db/migrate/20140122114406_migrate_mr_diffs.rb index 2cc5faaa851..1595e2b6472 100644 --- a/db/migrate/20140122114406_migrate_mr_diffs.rb +++ b/db/migrate/20140122114406_migrate_mr_diffs.rb @@ -1,8 +1,6 @@ class MigrateMrDiffs < ActiveRecord::Migration def self.up - execute "INSERT INTO merge_request_diffs ( merge_request_id ) SELECT id FROM merge_requests" - execute "UPDATE merge_requests mr, merge_request_diffs md SET md.st_commits = mr.st_commits WHERE md.merge_request_id = mr.id" - execute "UPDATE merge_requests mr, merge_request_diffs md SET md.st_diffs = mr.st_diffs WHERE md.merge_request_id = mr.id" + execute "INSERT INTO merge_request_diffs ( merge_request_id, st_commits, st_diffs ) SELECT id, st_commits, st_diffs FROM merge_requests" end def self.down |