debian-mirror-gitlab/db/migrate/20151209144329_migrate_ci_web_hooks.rb

17 lines
703 B
Ruby
Raw Normal View History

2018-12-23 12:14:25 +05:30
class MigrateCiWebHooks < ActiveRecord::Migration[4.2]
2017-08-17 22:00:37 +05:30
include Gitlab::Database::MigrationHelpers
2015-12-23 02:04:40 +05:30
def up
execute(
'INSERT INTO web_hooks (url, project_id, type, created_at, updated_at, push_events, issues_events, merge_requests_events, tag_push_events, note_events, build_events) ' \
"SELECT ci_web_hooks.url, projects.id, 'ProjectHook', ci_web_hooks.created_at, ci_web_hooks.updated_at, " \
"#{false_value}, #{false_value}, #{false_value}, #{false_value}, #{false_value}, #{true_value} FROM ci_web_hooks " \
'JOIN ci_projects ON ci_web_hooks.project_id = ci_projects.id ' \
'JOIN projects ON ci_projects.gitlab_id = projects.id'
)
end
def down
end
2015-12-23 02:04:40 +05:30
end