summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-04-27 16:10:49 +0000
committerDouwe Maan <douwe@gitlab.com>2017-04-27 16:10:49 +0000
commitb9eb846b921910acca6da517537e38ce3edea5a2 (patch)
tree9a12e359b9556b73bb59726bd6ef81c25ef7b4a2 /db/migrate
parent976b020aa3666ac9f1bd302e5b9bdfbe54f28fac (diff)
parent972440b15dfe2b76670f9bf6f39b8a9dd41589ca (diff)
downloadgitlab-ce-b9eb846b921910acca6da517537e38ce3edea5a2.tar.gz
Merge branch 'remove-invalid-services' into 'master'
Remove invalid services with nil or empty type See merge request !10847
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20170421102337_remove_nil_type_services.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/db/migrate/20170421102337_remove_nil_type_services.rb b/db/migrate/20170421102337_remove_nil_type_services.rb
new file mode 100644
index 00000000000..b835b9c6ed9
--- /dev/null
+++ b/db/migrate/20170421102337_remove_nil_type_services.rb
@@ -0,0 +1,12 @@
+class RemoveNilTypeServices < ActiveRecord::Migration
+ DOWNTIME = false
+
+ def up
+ execute <<-SQL
+ DELETE FROM services WHERE type IS NULL OR type = '';
+ SQL
+ end
+
+ def down
+ end
+end