gitlab-org--gitlab-foss/db/migrate/20150818213832_add_sent_notifications.rb
Sean McGivern 98bb435f42 Enable RuboCop for migrations
Migrations shouldn't fail RuboCop checks - especially lint checks, such
as the nested method check. To avoid changing code in existing
migrations, add the magic comment to the top of each of them to skip
that file.
2016-06-09 16:05:25 +01:00

14 lines
382 B
Ruby

# rubocop:disable all
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