diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-05-21 15:38:33 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-05-23 16:27:30 -0500 |
commit | ab91f76e8b275d0fc1d78b38b95d4b2cd8e73bdb (patch) | |
tree | e22910b5a3fc8dee98c5d674ee030b46421a4727 /db | |
parent | 52527be4387cb978402a330f2e4de96e586a62db (diff) | |
download | gitlab-ce-ab91f76e8b275d0fc1d78b38b95d4b2cd8e73bdb.tar.gz |
Add system note with link to diff comparison when MR discussion becomes outdated
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170521184006_add_change_position_to_notes.rb | 31 | ||||
-rw-r--r-- | db/schema.rb | 3 |
2 files changed, 33 insertions, 1 deletions
diff --git a/db/migrate/20170521184006_add_change_position_to_notes.rb b/db/migrate/20170521184006_add_change_position_to_notes.rb new file mode 100644 index 00000000000..0b199dade25 --- /dev/null +++ b/db/migrate/20170521184006_add_change_position_to_notes.rb @@ -0,0 +1,31 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class AddChangePositionToNotes < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + # When a migration requires downtime you **must** uncomment the following + # constant and define a short and easy to understand explanation as to why the + # migration requires downtime. + # DOWNTIME_REASON = '' + + # When using the methods "add_concurrent_index", "remove_concurrent_index" or + # "add_column_with_default" you must disable the use of transactions + # as these methods can not run in an existing transaction. + # When using "add_concurrent_index" or "remove_concurrent_index" methods make sure + # that either of them is the _only_ method called in the migration, + # any other changes should go in a separate migration. + # This ensures that upon failure _only_ the index creation or removing fails + # and can be retried or reverted easily. + # + # To disable transactions uncomment the following line and remove these + # comments: + # disable_ddl_transaction! + + def change + add_column :notes, :change_position, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index d14126401c9..84e25427d7f 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: 20170518231126) do +ActiveRecord::Schema.define(version: 20170521184006) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -794,6 +794,7 @@ ActiveRecord::Schema.define(version: 20170518231126) do t.string "discussion_id" t.text "note_html" t.integer "cached_markdown_version" + t.text "change_position" end add_index "notes", ["author_id"], name: "index_notes_on_author_id", using: :btree |