From 03e0604d5ded6402c7fddc4001ab23d9712c98de Mon Sep 17 00:00:00 2001 From: Oswaldo Ferreira Date: Fri, 15 Mar 2019 14:35:34 -0300 Subject: Prepare suggestion implementation for multi-line Adds the groundwork needed in order to persist multi-line suggestions, while providing the parsing strategy which will be reused for the **Preview** as well. --- db/migrate/20190228192410_add_multi_line_attributes_to_suggestion.rb | 2 +- db/schema.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'db') diff --git a/db/migrate/20190228192410_add_multi_line_attributes_to_suggestion.rb b/db/migrate/20190228192410_add_multi_line_attributes_to_suggestion.rb index cdb898011e3..856dfc89fa3 100644 --- a/db/migrate/20190228192410_add_multi_line_attributes_to_suggestion.rb +++ b/db/migrate/20190228192410_add_multi_line_attributes_to_suggestion.rb @@ -8,9 +8,9 @@ class AddMultiLineAttributesToSuggestion < ActiveRecord::Migration[5.0] disable_ddl_transaction! def up - add_column_with_default :suggestions, :outdated, :boolean, default: false, allow_null: false 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 diff --git a/db/schema.rb b/db/schema.rb index f34a776b2b0..06f9f5da10d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2039,9 +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.boolean "outdated", default: false, 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 -- cgit v1.2.1