-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HMS-4934: Add modules to introspected data (#922)
* Fixes 4934: module streams for introspected repositories * return empty array instead of null * add openapi * fix migrate to clear repomd checksum * test fix * bump yummy
- Loading branch information
1 parent
944fd44
commit d8c1e99
Showing
23 changed files
with
1,079 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
20250115112007 | ||
20250117072504 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
BEGIN; | ||
|
||
DROP TABLE IF EXISTS module_streams, repositories_module_streams; | ||
|
||
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
BEGIN; | ||
|
||
CREATE TABLE IF NOT EXISTS module_streams ( | ||
uuid UUID UNIQUE NOT NULL PRIMARY KEY, | ||
created_at TIMESTAMP WITH TIME ZONE, | ||
updated_at TIMESTAMP WITH TIME ZONE, | ||
name text NOT NULL, | ||
stream text NOT NULL, | ||
version text NOT NULL, | ||
context text NOT NULL, | ||
arch text NOT NULL, | ||
summary text NOT NULL, | ||
description text NOT NULL, | ||
package_names text[] NOT NULL, | ||
packages text[] NOT NULL, | ||
hash_value text NOT NULL, | ||
profiles jsonb NOT NULL DEFAULT '{}'::jsonb | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS repositories_module_streams ( | ||
repository_uuid UUID NOT NULL, | ||
module_stream_uuid UUID NOT NULL | ||
); | ||
|
||
CREATE INDEX IF NOT EXISTS module_streams_pkgs_idx ON module_streams USING GIN (package_names); | ||
CREATE INDEX IF NOT EXISTS module_streams_name_idx ON module_streams (uuid, name); | ||
|
||
ALTER TABLE ONLY repositories_module_streams | ||
DROP CONSTRAINT IF EXISTS repositories_module_streams_pkey, | ||
ADD CONSTRAINT repositories_module_streams_pkey PRIMARY KEY (repository_uuid, module_stream_uuid); | ||
|
||
ALTER TABLE ONLY repositories_module_streams | ||
DROP CONSTRAINT IF EXISTS fk_repositories_module_streams_mstream, | ||
ADD CONSTRAINT fk_repositories_module_streams_mstream | ||
FOREIGN KEY (module_stream_uuid) REFERENCES module_streams(uuid) | ||
ON DELETE CASCADE; | ||
|
||
ALTER TABLE ONLY repositories_module_streams | ||
DROP CONSTRAINT IF EXISTS fk_repositories_module_streams_repository, | ||
ADD CONSTRAINT fk_repositories_module_streams_repository | ||
FOREIGN KEY (repository_uuid) REFERENCES repositories(uuid) | ||
ON DELETE CASCADE; | ||
|
||
ALTER TABLE ONLY module_streams | ||
DROP CONSTRAINT IF EXISTS fk_module_streams_uniq, | ||
ADD CONSTRAINT fk_module_streams_uniq UNIQUE (hash_value); | ||
|
||
UPDATE repositories SET repomd_checksum = '' where public = true; | ||
|
||
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.