summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-07-22 16:26:33 -0600
committerDouwe Maan <douwe@selenight.nl>2016-07-23 14:51:52 -0600
commitbfaacb7bccac2b43974ffd527fad3f13a231fb2e (patch)
treec3bcdfea423673b402110c551fd37aac56769839 /db/migrate
parent46a17ffd5a200b4d2aca914ef5bafe46db1cb9bf (diff)
downloadgitlab-ce-bfaacb7bccac2b43974ffd527fad3f13a231fb2e.tar.gz
Fix bug where replies to commit notes displayed in the MR discussion tab wouldn't show up on the commit page
Diffstat (limited to 'db/migrate')
-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