diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-08-18 15:46:36 -0700 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-08-18 15:46:36 -0700 |
commit | f76eac56b9d7d4ae61010cddcca68682824b2239 (patch) | |
tree | 703e9cb22b0e44880775d0a4bb5bdbebc87a563f /db | |
parent | 204914983a015170ea1ca4cf6040c04d9a1ec1d9 (diff) | |
download | gitlab-ce-f76eac56b9d7d4ae61010cddcca68682824b2239.tar.gz |
Reply by email POC
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20150818213832_add_sent_notifications.rb | 13 | ||||
-rw-r--r-- | db/schema.rb | 13 |
2 files changed, 25 insertions, 1 deletions
diff --git a/db/migrate/20150818213832_add_sent_notifications.rb b/db/migrate/20150818213832_add_sent_notifications.rb new file mode 100644 index 00000000000..43e8d6a1a82 --- /dev/null +++ b/db/migrate/20150818213832_add_sent_notifications.rb @@ -0,0 +1,13 @@ +class AddSentNotifications < ActiveRecord::Migration + def change + create_table :sent_notifications do |t| + t.references :project + t.references :noteable, polymorphic: true + t.references :recipient + t.string :commit_id + t.string :reply_key, null: false + end + + add_index :sent_notifications, :reply_key, unique: true + end +end diff --git a/db/schema.rb b/db/schema.rb index 6e919f2883b..0827e810f18 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: 20150806104937) do +ActiveRecord::Schema.define(version: 20150818213832) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -404,6 +404,17 @@ ActiveRecord::Schema.define(version: 20150806104937) do add_index "protected_branches", ["project_id"], name: "index_protected_branches_on_project_id", using: :btree + create_table "sent_notifications", force: true do |t| + t.integer "project_id" + t.integer "noteable_id" + t.string "noteable_type" + t.integer "recipient_id" + t.string "commit_id" + t.string "reply_key", null: false + end + + add_index "sent_notifications", ["reply_key"], name: "index_sent_notifications_on_reply_key", unique: true, using: :btree + create_table "services", force: true do |t| t.string "type" t.string "title" |