diff options
-rw-r--r-- | db/post_migrate/20170301205640_migrate_build_events_to_pipeline_events.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/db/post_migrate/20170301205640_migrate_build_events_to_pipeline_events.rb b/db/post_migrate/20170301205640_migrate_build_events_to_pipeline_events.rb index 16a1bf06a91..2dd14ee5a78 100644 --- a/db/post_migrate/20170301205640_migrate_build_events_to_pipeline_events.rb +++ b/db/post_migrate/20170301205640_migrate_build_events_to_pipeline_events.rb @@ -69,18 +69,18 @@ class MigrateBuildEventsToPipelineEvents < ActiveRecord::Migration SQL else <<-SQL - UPDATE services build - LEFT OUTER JOIN services pipeline - ON build.project_id = pipeline.project_id - AND pipeline.type = 'PipelinesEmailService' - SET build.type = 'PipelinesEmailService' - , build.properties = replace(build.properties, + UPDATE services build_services + LEFT OUTER JOIN services pipeline_services + ON build_services.project_id = pipeline_services.project_id + AND pipeline_services.type = 'PipelinesEmailService' + SET build_services.type = 'PipelinesEmailService' + , build_services.properties = replace(build_services.properties, 'notify_only_broken_builds', 'notify_only_broken_pipelines') - , build.pipeline_events = #{true_value} - , build.build_events = #{false_value} - WHERE build.type = 'BuildsEmailService' - AND pipeline.id IS NULL; + , build_services.pipeline_events = #{true_value} + , build_services.build_events = #{false_value} + WHERE build_services.type = 'BuildsEmailService' + AND pipeline_services.id IS NULL; SQL end.strip_heredoc end |