summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-12 10:45:42 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-12 10:45:42 +0000
commit1a1e42ad3115f132947a0399a2c44c734f09b010 (patch)
tree7350f82411f13f6e25ee6e3b737d1a126ed1ac29 /db
parentff13fb0ab5caddfc431a681f40eac96eb2750e3b (diff)
parent54db527b4c44b102b81f4614bee6b06d2b742f6a (diff)
downloadgitlab-ce-1a1e42ad3115f132947a0399a2c44c734f09b010.tar.gz
Merge branch 'rs-system-note' into 'master'
Add SystemNoteService class The Note model was basically two models crammed together - one handling user-created notes (i.e., comments on things) and one handling system-created notes (i.e., references). This splits out the system-specific stuff to a new SystemNoteService class. See merge request !595
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20150509180749_convert_legacy_reference_notes.rb16
-rw-r--r--db/schema.rb2
2 files changed, 17 insertions, 1 deletions
diff --git a/db/migrate/20150509180749_convert_legacy_reference_notes.rb b/db/migrate/20150509180749_convert_legacy_reference_notes.rb
new file mode 100644
index 00000000000..b02605489be
--- /dev/null
+++ b/db/migrate/20150509180749_convert_legacy_reference_notes.rb
@@ -0,0 +1,16 @@
+# Convert legacy Markdown-emphasized notes to the current, non-emphasized format
+#
+# _mentioned in 54f7727c850972f0401c1312a7c4a6a380de5666_
+#
+# becomes
+#
+# mentioned in 54f7727c850972f0401c1312a7c4a6a380de5666
+class ConvertLegacyReferenceNotes < ActiveRecord::Migration
+ def up
+ execute %q{UPDATE notes SET note = trim(both '_' from note) WHERE system = true AND note LIKE '\_%\_'}
+ end
+
+ def down
+ # noop
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 3e5810d7408..6606e13d3d1 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20150502064022) do
+ActiveRecord::Schema.define(version: 20150509180749) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"