Skip to content
Snippets Groups Projects
Unverified Commit 005d88b9 authored by Ethan Urie's avatar Ethan Urie :two:
Browse files

Add text limit and fix `#down`

Changelog: changed
MR: !114518
EE: false
parent c690b68c
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
......
......@@ -8,13 +8,27 @@ class AddFieldsToAbuseReports < Gitlab::Database::Migration[2.1]
def up
with_lock_retries do
unless column_exists?(:abuse_reports, :evidence) do
add_column :abuse_reports, :evidence, :json, null: true
end
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
remove_column :abuse_reports, :evidence
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
......@@ -10754,8 +10754,16 @@ CREATE TABLE abuse_reports (
links_to_spam text[] DEFAULT '{}'::text[] NOT NULL,
status smallint DEFAULT 1 NOT NULL,
resolved_at timestamp with time zone,
resolved_by_id integer,
assignee_id integer,
updated_by_id integer,
last_edited_by_id integer,
last_edited_at timestamp with time zone,
mitigation_steps text,
evidence jsonb,
CONSTRAINT abuse_reports_links_to_spam_length_check CHECK ((cardinality(links_to_spam) <= 20)),
CONSTRAINT check_ab1260fa6c CHECK ((char_length(reported_from_url) <= 512))
CONSTRAINT check_ab1260fa6c CHECK ((char_length(reported_from_url) <= 512)),
CONSTRAINT check_f3c0947a2d CHECK ((char_length(mitigation_steps) <= 1000))
);
 
CREATE SEQUENCE abuse_reports_id_seq
......@@ -11631,7 +11639,7 @@ CREATE TABLE application_settings (
container_registry_import_start_max_retries integer DEFAULT 50 NOT NULL,
container_registry_import_max_step_duration integer DEFAULT 300 NOT NULL,
container_registry_import_target_plan text DEFAULT 'free'::text NOT NULL,
container_registry_import_created_before timestamp with time zone DEFAULT '2022-01-23 00:00:00+00'::timestamp with time zone NOT NULL,
container_registry_import_created_before timestamp with time zone DEFAULT '2022-01-22 19:00:00-05'::timestamp with time zone NOT NULL,
runner_token_expiration_interval integer,
group_runner_token_expiration_interval integer,
project_runner_token_expiration_interval integer,
......@@ -30262,7 +30270,7 @@ CREATE INDEX index_events_on_author_id_and_created_at_merge_requests ON events U
 
CREATE INDEX index_events_on_author_id_and_id ON events USING btree (author_id, id);
 
CREATE INDEX index_events_on_created_at_and_id ON events USING btree (created_at, id) WHERE (created_at > '2021-08-27 00:00:00+00'::timestamp with time zone);
CREATE INDEX index_events_on_created_at_and_id ON events USING btree (created_at, id) WHERE (created_at > '2021-08-26 20:00:00-04'::timestamp with time zone);
 
CREATE INDEX index_events_on_group_id_and_id ON events USING btree (group_id, id) WHERE (group_id IS NOT NULL);
 
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