summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorJarka Kadlecova <jarka@gitlab.com>2017-03-15 14:19:45 +0100
committerJarka Kadlecova <jarka@gitlab.com>2017-03-28 15:16:41 +0200
commitc729d9dae7ad8c32cbe93b590baa24c8133364e5 (patch)
tree45bccc7eca5c789821a2435e7a0f3f1c75fc9e0e /db
parent1c3c7fb25d972fc19d5b4bb371cb21094d81e478 (diff)
downloadgitlab-ce-c729d9dae7ad8c32cbe93b590baa24c8133364e5.tar.gz
Create metadata when creating system notes
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170314082049_create_system_note_metadata.rb10
-rw-r--r--db/schema.rb2
2 files changed, 8 insertions, 4 deletions
diff --git a/db/migrate/20170314082049_create_system_note_metadata.rb b/db/migrate/20170314082049_create_system_note_metadata.rb
index c58da88631f..dd1e6cf8172 100644
--- a/db/migrate/20170314082049_create_system_note_metadata.rb
+++ b/db/migrate/20170314082049_create_system_note_metadata.rb
@@ -5,15 +5,19 @@ class CreateSystemNoteMetadata < ActiveRecord::Migration
disable_ddl_transaction!
- def change
+ def up
create_table :system_note_metadata do |t|
t.references :note, null: false
t.integer :commit_count
- t.string :icon
+ t.string :action
t.timestamps null: false
end
- add_concurrent_foreign_key :system_note_metadata, :notes, column: :note_id, on_delete: :cascade
+ add_concurrent_foreign_key :system_note_metadata, :notes, column: :note_id
+ end
+
+ def down
+ drop_table :system_note_metadata
end
end
diff --git a/db/schema.rb b/db/schema.rb
index 456dbd41230..dba242548c1 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -1078,7 +1078,7 @@ ActiveRecord::Schema.define(version: 20170317203554) do
create_table "system_note_metadata", force: :cascade do |t|
t.integer "note_id", null: false
t.integer "commit_count"
- t.string "icon"
+ t.string "action"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end