Skip to content
Snippets Groups Projects
Commit 6e1986f9 authored by Ethan Urie's avatar Ethan Urie :two:
Browse files

Merge branch 'eurie-add-fields-to-abuse-reports' into 'master'

Draft: Fields to AbuseReports

See merge request !114518



Merged-by: default avatarEthan Urie <eurie@gitlab.com>
Co-authored-by: default avatarEthan Urie <ethan.urie@gmail.com>
parents 1fcebc5c 23167e9d
No related branches found
No related tags found
No related merge requests found
Pipeline #806232981 failed
Pipeline: GitLab

#806238163

    ---
    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]
    INDEX_NAME = "index_abuse_reports_on_assignee_id"
    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
    add_concurrent_index :abuse_reports, [:assignee_id], name: INDEX_NAME
    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
    remove_concurrent_index_by_name :abuse_reports, INDEX_NAME
    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