diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20160508215820_add_type_to_notes.rb | 5 | ||||
-rw-r--r-- | db/migrate/20160508221410_set_type_on_legacy_diff_notes.rb | 5 | ||||
-rw-r--r-- | db/schema.rb | 5 |
3 files changed, 13 insertions, 2 deletions
diff --git a/db/migrate/20160508215820_add_type_to_notes.rb b/db/migrate/20160508215820_add_type_to_notes.rb new file mode 100644 index 00000000000..58944d4e651 --- /dev/null +++ b/db/migrate/20160508215820_add_type_to_notes.rb @@ -0,0 +1,5 @@ +class AddTypeToNotes < ActiveRecord::Migration + def change + add_column :notes, :type, :string + end +end 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 diff --git a/db/schema.rb b/db/schema.rb index f09e4a262b4..af4f4c609e7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -632,10 +632,11 @@ ActiveRecord::Schema.define(version: 20160509201028) do t.string "line_code" t.string "commit_id" t.integer "noteable_id" - t.boolean "system", default: false, null: false + t.boolean "system", default: false, null: false t.text "st_diff" t.integer "updated_by_id" - t.boolean "is_award", default: false, null: false + t.boolean "is_award", default: false, null: false + t.string "type" end add_index "notes", ["author_id"], name: "index_notes_on_author_id", using: :btree |