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:
authorAlejandro Rodríguez <alejorro70@gmail.com>2016-11-11 20:23:08 +0300
committerAlejandro Rodríguez <alejorro70@gmail.com>2016-11-11 21:34:00 +0300
commit591f10f6bd8d92e083fbc3c691c874e62144ba25 (patch)
treecb9ae0ebb8722b7e60308fb5df0e5088f9b511c0 /db/post_migrate
parent67041e63c283fe4586251fdc56eaa02cc9a22241 (diff)
Update 8.14-rc1 migrations to minimize downtime and deploy time
See https://gitlab.com/gitlab-org/gitlab-ce/issues/24386
Diffstat (limited to 'db/post_migrate')
-rw-r--r--db/post_migrate/20161011222551_remove_inactive_jira_service_properties.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/db/post_migrate/20161011222551_remove_inactive_jira_service_properties.rb b/db/post_migrate/20161011222551_remove_inactive_jira_service_properties.rb
new file mode 100644
index 00000000000..319d86ac159
--- /dev/null
+++ b/db/post_migrate/20161011222551_remove_inactive_jira_service_properties.rb
@@ -0,0 +1,10 @@
+class RemoveInactiveJiraServiceProperties < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = true
+ DOWNTIME_REASON = "Removes all inactive jira_service properties"
+
+ def up
+ execute("UPDATE services SET properties = '{}' WHERE services.type = 'JiraService' and services.active = false")
+ end
+end