-
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.
Fixes 4934: module streams for introspected repositories
- Loading branch information
1 parent
b78164d
commit a3c0075
Showing
20 changed files
with
869 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
20241113084850 | ||
20241202091225 |
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,45 @@ | ||
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 | ||
); | ||
|
||
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); | ||
|
||
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.