Skip to content
Snippets Groups Projects

Draft: Fields to AbuseReports

Closed Ethan Urie requested to merge eurie-add-fields-to-abuse-reports into master
1 unresolved thread
@@ -4,6 +4,8 @@
@@ -4,6 +4,8 @@
# for more information on how to write migrations for GitLab.
# for more information on how to write migrations for GitLab.
class AddFieldsToAbuseReports < Gitlab::Database::Migration[2.1]
class AddFieldsToAbuseReports < Gitlab::Database::Migration[2.1]
 
INDEX_NAME = "index_abuse_reports_on_assignee_id"
 
disable_ddl_transaction!
disable_ddl_transaction!
def up
def up
@@ -18,6 +20,7 @@ def up
@@ -18,6 +20,7 @@ def up
end
end
add_text_limit :abuse_reports, :mitigation_steps, 1000
add_text_limit :abuse_reports, :mitigation_steps, 1000
 
add_concurrent_index :abuse_reports, [:assignee_id], name: INDEX_NAME
end
end
def down
def down
@@ -30,5 +33,6 @@ def down
@@ -30,5 +33,6 @@ def down
t.remove :mitigation_steps
t.remove :mitigation_steps
t.remove :evidence
t.remove :evidence
end
end
 
remove_concurrent_index_by_name :abuse_reports, INDEX_NAME
end
end
end
end
Loading