summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2017-04-25 16:48:12 +0100
committerTiago Botelho <tiagonbotelho@hotmail.com>2017-04-27 15:59:25 +0100
commit972440b15dfe2b76670f9bf6f39b8a9dd41589ca (patch)
treef01c7526f6d08429eb8d5c22f4157679002284ee /db
parent67974f1dfb413452ca6fc048c856360f4a843eb1 (diff)
downloadgitlab-ce-972440b15dfe2b76670f9bf6f39b8a9dd41589ca.tar.gz
tadds migration to remove invalid services
Diffstat (limited to 'db')
-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