Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20151209145909_migrate_ci_emails.rb')
-rw-r--r--db/migrate/20151209145909_migrate_ci_emails.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/db/migrate/20151209145909_migrate_ci_emails.rb b/db/migrate/20151209145909_migrate_ci_emails.rb
index ebf0e7d264f..964dde841ad 100644
--- a/db/migrate/20151209145909_migrate_ci_emails.rb
+++ b/db/migrate/20151209145909_migrate_ci_emails.rb
@@ -2,6 +2,9 @@ class MigrateCiEmails < ActiveRecord::Migration
include Gitlab::Database
def up
+ # This inserts a new service: BuildsEmailService
+ # It also "manually" constructs the properties (JSON-encoded)
+ # Migrating all ci_projects e-mail related columns
execute(
'INSERT INTO services (project_id, type, created_at, updated_at, active, push_events, issues_events, merge_requests_events, tag_push_events, note_events, build_events, properties) ' \
"SELECT projects.id, 'BuildsEmailService', ci_services.created_at, ci_services.updated_at, #{true_value}, #{false_value}, #{false_value}, #{false_value}, #{false_value}, #{false_value}, #{true_value}, " \
@@ -13,4 +16,7 @@ class MigrateCiEmails < ActiveRecord::Migration
"WHERE ci_services.type = 'Ci::MailService' AND ci_services.active"
)
end
+
+ def down
+ end
end