debian-mirror-gitlab/db/migrate/20200825071735_create_merge_request_reviewers.rb

23 lines
569 B
Ruby
Raw Normal View History

2020-11-24 15:15:51 +05:30
# frozen_string_literal: true
class CreateMergeRequestReviewers < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
create_table :merge_request_reviewers do |t|
t.bigint :user_id, null: false
t.bigint :merge_request_id, null: false
t.datetime_with_timezone :created_at, null: false
end
add_index :merge_request_reviewers, [:merge_request_id, :user_id], unique: true
add_index :merge_request_reviewers, :user_id
end
def down
drop_table :merge_request_reviewers
end
end