diff options
Diffstat (limited to 'db/migrate/20231003073437_create_abuse_report_user_mentions.rb')
-rw-r--r-- | db/migrate/20231003073437_create_abuse_report_user_mentions.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/db/migrate/20231003073437_create_abuse_report_user_mentions.rb b/db/migrate/20231003073437_create_abuse_report_user_mentions.rb new file mode 100644 index 00000000000..42eb29fc546 --- /dev/null +++ b/db/migrate/20231003073437_create_abuse_report_user_mentions.rb @@ -0,0 +1,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 |