summaryrefslogtreecommitdiff
path: root/db/migrate/20160722221922_nullify_blank_type_on_notes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20160722221922_nullify_blank_type_on_notes.rb')
-rw-r--r--db/migrate/20160722221922_nullify_blank_type_on_notes.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/20160722221922_nullify_blank_type_on_notes.rb b/db/migrate/20160722221922_nullify_blank_type_on_notes.rb
new file mode 100644
index 00000000000..c4b78e8e15c
--- /dev/null
+++ b/db/migrate/20160722221922_nullify_blank_type_on_notes.rb
@@ -0,0 +1,9 @@
+class NullifyBlankTypeOnNotes < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def up
+ execute "UPDATE notes SET type = NULL WHERE type = ''"
+ end
+end