summaryrefslogtreecommitdiff
path: root/db/migrate/20151209145909_migrate_ci_emails.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-12-10 14:08:09 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2015-12-10 16:04:08 +0100
commit80f8074d01a310141984dad9dfe01a27b533e78a (patch)
tree7572628ea97b47ca3a2ff613bbfc8e2564256978 /db/migrate/20151209145909_migrate_ci_emails.rb
parentd5c91bb9a601a1a344d94763654f0b0996857497 (diff)
downloadgitlab-ce-80f8074d01a310141984dad9dfe01a27b533e78a.tar.gz
Migrate SlackService and HipChat service
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