summaryrefslogtreecommitdiff
path: root/db/migrate/20160508221410_set_type_on_legacy_diff_notes.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-05-10 17:41:46 -0500
committerDouwe Maan <douwe@selenight.nl>2016-05-13 17:31:43 -0500
commit99d3e21f19ffb5cccb58fdfeac4fb6174e7e65e2 (patch)
tree3dae33d98b9688a3f7e9a4c923f555920d86652b /db/migrate/20160508221410_set_type_on_legacy_diff_notes.rb
parent5e130c3e39febcd577e61ebd30bd231827d41f2c (diff)
downloadgitlab-ce-99d3e21f19ffb5cccb58fdfeac4fb6174e7e65e2.tar.gz
Extract LegacyDiffNote out of Note
Diffstat (limited to 'db/migrate/20160508221410_set_type_on_legacy_diff_notes.rb')
-rw-r--r--db/migrate/20160508221410_set_type_on_legacy_diff_notes.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/db/migrate/20160508221410_set_type_on_legacy_diff_notes.rb b/db/migrate/20160508221410_set_type_on_legacy_diff_notes.rb
new file mode 100644
index 00000000000..c3f23d89d5a
--- /dev/null
+++ b/db/migrate/20160508221410_set_type_on_legacy_diff_notes.rb
@@ -0,0 +1,5 @@
+class SetTypeOnLegacyDiffNotes < ActiveRecord::Migration
+ def change
+ execute "UPDATE notes SET type = 'LegacyDiffNote' WHERE line_code IS NOT NULL"
+ end
+end