Skip to content
Snippets Groups Projects
Commit a2c69dd5 authored by Ethan Urie's avatar Ethan Urie Committed by Ethan Urie
Browse files

Create the `down` method

Add text limit and fix `#down`

Changelog: changed
MR: !114518
EE: false
parent ce9a428d
No related branches found
No related tags found
No related merge requests found
---
table_name: merge_requests_compliance_violations
classes:
- EE::MergeRequests::ComplianceViolation
- MergeRequests::ComplianceViolation
feature_categories:
- compliance_management
......
# frozen_string_literal: true
# See https://docs.gitlab.com/ee/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class AddFieldsToAbuseReports < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
def up
with_lock_retries do
add_column :abuse_reports, :resolved_by_id, :int, null: true
add_column :abuse_reports, :assignee_id, :int, null: true
add_column :abuse_reports, :updated_by_id, :int, null: true
add_column :abuse_reports, :last_edited_by_id, :int, null: true
add_column :abuse_reports, :last_edited_at, :datetime_with_timezone, null: true
add_column :abuse_reports, :mitigation_steps, :text, null: true
add_column :abuse_reports, :evidence, :jsonb, null: true
end
add_text_limit :abuse_reports, :mitigation_steps, 1000
end
def down
change_table :abuse_reports do |t|
t.remove :resolved_by_id
t.remove :assignee_id
t.remove :updated_by_id
t.remove :last_edited_by_id
t.remove :last_edited_at
t.remove :mitigation_steps
t.remove :evidence
end
end
end
0542f3f8d311833eba1187c505b15ba1dc50d45f62354921c22b0c826dd4bedd
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment