diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-04-27 16:10:49 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-04-27 16:10:49 +0000 |
commit | b9eb846b921910acca6da517537e38ce3edea5a2 (patch) | |
tree | 9a12e359b9556b73bb59726bd6ef81c25ef7b4a2 /db/migrate | |
parent | 976b020aa3666ac9f1bd302e5b9bdfbe54f28fac (diff) | |
parent | 972440b15dfe2b76670f9bf6f39b8a9dd41589ca (diff) | |
download | gitlab-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.rb | 12 |
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 |