Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/docs/dast_scanner_profiles_tags.yml10
-rw-r--r--db/migrate/20221114131943_add_short_title_to_appearances.rb10
-rw-r--r--db/migrate/20221115085813_add_limit_to_appereances_short_title.rb13
-rw-r--r--db/migrate/20221207220120_create_dast_scanner_profiles_runner_tags.rb18
-rw-r--r--db/schema_migrations/202211141319431
-rw-r--r--db/schema_migrations/202211150858131
-rw-r--r--db/schema_migrations/202212072201201
-rw-r--r--db/structure.sql31
8 files changed, 84 insertions, 1 deletions
diff --git a/db/docs/dast_scanner_profiles_tags.yml b/db/docs/dast_scanner_profiles_tags.yml
new file mode 100644
index 00000000000..9766ce6c4fc
--- /dev/null
+++ b/db/docs/dast_scanner_profiles_tags.yml
@@ -0,0 +1,10 @@
+---
+table_name: dast_scanner_profiles_tags
+classes:
+ - Dast::ScannerProfileTag
+feature_categories:
+ - dynamic_application_security_testing
+description: Join Table for Runner tags and DAST Scanner Profiles
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/104909
+milestone: '15.7'
+gitlab_schema: gitlab_main
diff --git a/db/migrate/20221114131943_add_short_title_to_appearances.rb b/db/migrate/20221114131943_add_short_title_to_appearances.rb
new file mode 100644
index 00000000000..6bf5d32f441
--- /dev/null
+++ b/db/migrate/20221114131943_add_short_title_to_appearances.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddShortTitleToAppearances < Gitlab::Database::Migration[2.0]
+ # rubocop:disable Migration/AddLimitToTextColumns
+ # limit is added in 20221115085813_add_limit_to_appereances_short_title.rb
+ def change
+ add_column :appearances, :short_title, :text
+ end
+ # rubocop:enable Migration/AddLimitToTextColumns
+end
diff --git a/db/migrate/20221115085813_add_limit_to_appereances_short_title.rb b/db/migrate/20221115085813_add_limit_to_appereances_short_title.rb
new file mode 100644
index 00000000000..d75895216f7
--- /dev/null
+++ b/db/migrate/20221115085813_add_limit_to_appereances_short_title.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class AddLimitToAppereancesShortTitle < Gitlab::Database::Migration[2.0]
+ disable_ddl_transaction!
+
+ def up
+ add_text_limit :appearances, :short_title, 255
+ end
+
+ def down
+ remove_text_limit :appearances, :short_title
+ end
+end
diff --git a/db/migrate/20221207220120_create_dast_scanner_profiles_runner_tags.rb b/db/migrate/20221207220120_create_dast_scanner_profiles_runner_tags.rb
new file mode 100644
index 00000000000..f07cebb6b2c
--- /dev/null
+++ b/db/migrate/20221207220120_create_dast_scanner_profiles_runner_tags.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class CreateDastScannerProfilesRunnerTags < Gitlab::Database::Migration[2.1]
+ def up
+ create_table :dast_scanner_profiles_tags do |t|
+ t.references :dast_scanner_profile, null: false, foreign_key: { on_delete: :cascade },
+ index: { name: 'i_dast_scanner_profiles_tags_on_scanner_profiles_id' }
+
+ t.bigint :tag_id, null: false
+
+ t.index :tag_id, name: :index_dast_scanner_profiles_tags_on_tag_id
+ end
+ end
+
+ def down
+ drop_table :dast_scanner_profiles_tags
+ end
+end
diff --git a/db/schema_migrations/20221114131943 b/db/schema_migrations/20221114131943
new file mode 100644
index 00000000000..ce5aa4208b4
--- /dev/null
+++ b/db/schema_migrations/20221114131943
@@ -0,0 +1 @@
+f101fcfae81e560c141c571f1494d63821b28271bda74cc2697cea9895872f8f \ No newline at end of file
diff --git a/db/schema_migrations/20221115085813 b/db/schema_migrations/20221115085813
new file mode 100644
index 00000000000..c2f7c8a7c51
--- /dev/null
+++ b/db/schema_migrations/20221115085813
@@ -0,0 +1 @@
+b6538475a9c8a48e640ae367523b9843573e271e508e3f8fe575abef0a4b64f3 \ No newline at end of file
diff --git a/db/schema_migrations/20221207220120 b/db/schema_migrations/20221207220120
new file mode 100644
index 00000000000..3ff084a13ac
--- /dev/null
+++ b/db/schema_migrations/20221207220120
@@ -0,0 +1 @@
+caa6f87b639b62ea25c9f7adc81bd64bba4084b8987bfc5df84f507b63faab4a \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 2aad46280a3..9eae9c42525 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -11063,7 +11063,9 @@ CREATE TABLE appearances (
email_header_and_footer_enabled boolean DEFAULT false NOT NULL,
profile_image_guidelines text,
profile_image_guidelines_html text,
- CONSTRAINT appearances_profile_image_guidelines CHECK ((char_length(profile_image_guidelines) <= 4096))
+ short_title text,
+ CONSTRAINT appearances_profile_image_guidelines CHECK ((char_length(profile_image_guidelines) <= 4096)),
+ CONSTRAINT check_fdf3064682 CHECK ((char_length(short_title) <= 255))
);
CREATE SEQUENCE appearances_id_seq
@@ -14530,6 +14532,21 @@ CREATE SEQUENCE dast_scanner_profiles_id_seq
ALTER SEQUENCE dast_scanner_profiles_id_seq OWNED BY dast_scanner_profiles.id;
+CREATE TABLE dast_scanner_profiles_tags (
+ id bigint NOT NULL,
+ dast_scanner_profile_id bigint NOT NULL,
+ tag_id bigint NOT NULL
+);
+
+CREATE SEQUENCE dast_scanner_profiles_tags_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE dast_scanner_profiles_tags_id_seq OWNED BY dast_scanner_profiles_tags.id;
+
CREATE TABLE dast_site_profile_secret_variables (
id bigint NOT NULL,
dast_site_profile_id bigint NOT NULL,
@@ -23957,6 +23974,8 @@ ALTER TABLE ONLY dast_profiles ALTER COLUMN id SET DEFAULT nextval('dast_profile
ALTER TABLE ONLY dast_scanner_profiles ALTER COLUMN id SET DEFAULT nextval('dast_scanner_profiles_id_seq'::regclass);
+ALTER TABLE ONLY dast_scanner_profiles_tags ALTER COLUMN id SET DEFAULT nextval('dast_scanner_profiles_tags_id_seq'::regclass);
+
ALTER TABLE ONLY dast_site_profile_secret_variables ALTER COLUMN id SET DEFAULT nextval('dast_site_profile_secret_variables_id_seq'::regclass);
ALTER TABLE ONLY dast_site_profiles ALTER COLUMN id SET DEFAULT nextval('dast_site_profiles_id_seq'::regclass);
@@ -25820,6 +25839,9 @@ ALTER TABLE ONLY dast_scanner_profiles_builds
ALTER TABLE ONLY dast_scanner_profiles
ADD CONSTRAINT dast_scanner_profiles_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY dast_scanner_profiles_tags
+ ADD CONSTRAINT dast_scanner_profiles_tags_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY dast_site_profile_secret_variables
ADD CONSTRAINT dast_site_profile_secret_variables_pkey PRIMARY KEY (id);
@@ -28131,6 +28153,8 @@ CREATE INDEX i_compliance_frameworks_on_id_and_created_at ON compliance_manageme
CREATE INDEX i_dast_pre_scan_verification_steps_on_pre_scan_verification_id ON dast_pre_scan_verification_steps USING btree (dast_pre_scan_verification_id);
+CREATE INDEX i_dast_scanner_profiles_tags_on_scanner_profiles_id ON dast_scanner_profiles_tags USING btree (dast_scanner_profile_id);
+
CREATE UNIQUE INDEX i_pm_licenses_on_spdx_identifier ON pm_licenses USING btree (spdx_identifier);
CREATE UNIQUE INDEX i_pm_package_versions_on_package_id_and_version ON pm_package_versions USING btree (pm_package_id, version);
@@ -29091,6 +29115,8 @@ CREATE UNIQUE INDEX index_dast_profiles_pipelines_on_ci_pipeline_id ON dast_prof
CREATE UNIQUE INDEX index_dast_scanner_profiles_on_project_id_and_name ON dast_scanner_profiles USING btree (project_id, name);
+CREATE INDEX index_dast_scanner_profiles_tags_on_tag_id ON dast_scanner_profiles_tags USING btree (tag_id);
+
CREATE INDEX index_dast_site_profiles_on_dast_site_id ON dast_site_profiles USING btree (dast_site_id);
CREATE UNIQUE INDEX index_dast_site_profiles_on_project_id_and_name ON dast_site_profiles USING btree (project_id, name);
@@ -35412,6 +35438,9 @@ ALTER TABLE ONLY incident_management_timeline_event_tags
ALTER TABLE ONLY user_callouts
ADD CONSTRAINT fk_rails_ddfdd80f3d FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+ALTER TABLE ONLY dast_scanner_profiles_tags
+ ADD CONSTRAINT fk_rails_deb79b7f19 FOREIGN KEY (dast_scanner_profile_id) REFERENCES dast_scanner_profiles(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY vulnerability_feedback
ADD CONSTRAINT fk_rails_debd54e456 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;