summaryrefslogtreecommitdiff
path: root/db/migrate/20150818213832_add_sent_notifications.rb
blob: 45e95a843e1c9ca2c4dca6517e193259cdcec2fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
class AddSentNotifications < ActiveRecord::Migration[4.2]
  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