diff options
author | Andreas Brandl <abrandl@gitlab.com> | 2019-03-27 16:57:25 +0000 |
---|---|---|
committer | Andreas Brandl <abrandl@gitlab.com> | 2019-03-27 16:57:25 +0000 |
commit | f5ba7ac357d3384e0d7627fd6c18c1377ec0a425 (patch) | |
tree | 2875796c41947ac079edddb510e23bcc0562884f /db | |
parent | d160e6bcd4d89305287c7ff0f8fafc2dc4353bd1 (diff) | |
parent | 03e0604d5ded6402c7fddc4001ab23d9712c98de (diff) | |
download | gitlab-ce-f5ba7ac357d3384e0d7627fd6c18c1377ec0a425.tar.gz |
Merge branch 'osw-multi-line-suggestions-creation-strategy' into 'master'
Prepares suggestion implementation for multi-line support
See merge request gitlab-org/gitlab-ce!26057
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20190228192410_add_multi_line_attributes_to_suggestion.rb | 19 | ||||
-rw-r--r-- | db/schema.rb | 3 |
2 files changed, 22 insertions, 0 deletions
diff --git a/db/migrate/20190228192410_add_multi_line_attributes_to_suggestion.rb b/db/migrate/20190228192410_add_multi_line_attributes_to_suggestion.rb new file mode 100644 index 00000000000..856dfc89fa3 --- /dev/null +++ b/db/migrate/20190228192410_add_multi_line_attributes_to_suggestion.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class AddMultiLineAttributesToSuggestion < ActiveRecord::Migration[5.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_column_with_default :suggestions, :lines_above, :integer, default: 0, allow_null: false + add_column_with_default :suggestions, :lines_below, :integer, default: 0, allow_null: false + add_column_with_default :suggestions, :outdated, :boolean, default: false, allow_null: false + end + + def down + remove_columns :suggestions, :outdated, :lines_above, :lines_below + end +end diff --git a/db/schema.rb b/db/schema.rb index 0c997f3b8a2..06f9f5da10d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2039,6 +2039,9 @@ ActiveRecord::Schema.define(version: 20190322132835) do t.string "commit_id" t.text "from_content", null: false t.text "to_content", null: false + t.integer "lines_above", default: 0, null: false + t.integer "lines_below", default: 0, null: false + t.boolean "outdated", default: false, null: false t.index ["note_id", "relative_order"], name: "index_suggestions_on_note_id_and_relative_order", unique: true, using: :btree end |