blob: 42eb29fc54618f865c9be9f9bb552488ac7d7975 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# frozen_string_literal: true
class CreateAbuseReportUserMentions < Gitlab::Database::Migration[2.1]
enable_lock_retries!
def up
create_table :abuse_report_user_mentions do |t|
t.bigint :abuse_report_id, null: false
t.bigint :note_id, null: false
t.bigint :mentioned_users_ids, array: true, default: nil
t.bigint :mentioned_projects_ids, array: true, default: nil
t.bigint :mentioned_groups_ids, array: true, default: nil
t.index :note_id
t.index [:abuse_report_id, :note_id],
unique: true,
name: :index_abuse_report_user_mentions_on_abuse_report_id_and_note_id
end
end
def down
drop_table :abuse_report_user_mentions, if_exists: true
end
end
|