diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-14 15:10:37 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-14 15:10:37 +0300 |
commit | 89a0c1fa668ec9af6e7cc39935199f24dbee23b6 (patch) | |
tree | cbc83b998450c3cad752abc9450f211e084bba58 /db | |
parent | 3c0faf1c6b40536c7b7687225ff4e03e884192d5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20231211100717_add_source_package_name_to_sbom_component_versions.rb | 21 | ||||
-rw-r--r-- | db/schema_migrations/20231211100717 | 1 | ||||
-rw-r--r-- | db/structure.sql | 2 |
3 files changed, 24 insertions, 0 deletions
diff --git a/db/migrate/20231211100717_add_source_package_name_to_sbom_component_versions.rb b/db/migrate/20231211100717_add_source_package_name_to_sbom_component_versions.rb new file mode 100644 index 00000000000..9c8e4733ace --- /dev/null +++ b/db/migrate/20231211100717_add_source_package_name_to_sbom_component_versions.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class AddSourcePackageNameToSbomComponentVersions < Gitlab::Database::Migration[2.2] + disable_ddl_transaction! + + milestone '16.7' + + def up + with_lock_retries do + add_column :sbom_component_versions, :source_package_name, :text, if_not_exists: true + end + + add_text_limit :sbom_component_versions, :source_package_name, 255 + end + + def down + with_lock_retries do + remove_column :sbom_component_versions, :source_package_name, if_exists: true + end + end +end diff --git a/db/schema_migrations/20231211100717 b/db/schema_migrations/20231211100717 new file mode 100644 index 00000000000..876770c9da4 --- /dev/null +++ b/db/schema_migrations/20231211100717 @@ -0,0 +1 @@ +557e640d30119599a2ca50cbe2b4e36f01b888df5a4679de362ae000ee23072b
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 72a8bb9ced3..484a667b113 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -23117,6 +23117,8 @@ CREATE TABLE sbom_component_versions ( updated_at timestamp with time zone NOT NULL, component_id bigint NOT NULL, version text NOT NULL, + source_package_name text, + CONSTRAINT check_39636b9a8a CHECK ((char_length(source_package_name) <= 255)), CONSTRAINT check_e71cad08d3 CHECK ((char_length(version) <= 255)) ); |