-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add artifact_type for artifact model to support artifactType filter
Signed-off-by: yminer <[email protected]> add 2.11 sql schema & update index artifactType omitted Signed-off-by: yminer <[email protected]> update UT
- Loading branch information
Showing
12 changed files
with
342 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
table artifact: | ||
id SERIAL PRIMARY KEY NOT NULL, | ||
type varchar(255) NOT NULL, | ||
media_type varchar(255) NOT NULL, | ||
manifest_media_type varchar(255) NOT NULL, | ||
artifact_type varchar(255) NOT NULL, | ||
project_id int NOT NULL, | ||
repository_id int NOT NULL, | ||
repository_name varchar(255) NOT NULL, | ||
digest varchar(255) NOT NULL, | ||
size bigint, | ||
push_time timestamp default CURRENT_TIMESTAMP, | ||
pull_time timestamp, | ||
extra_attrs text, | ||
annotations jsonb, | ||
CONSTRAINT unique_artifact UNIQUE (repository_id, digest) | ||
*/ | ||
|
||
/* | ||
Add new column artifact_type for artifact table to work with oci-spec v1.1.0 list referrer api | ||
*/ | ||
ALTER TABLE artifact ADD COLUMN artifact_type varchar(255) NOT NULL Default ''; | ||
|
||
/*set the artifact_type | ||
UPDATE artifact | ||
SET artifact_type = media_type | ||
WHERE media_type = 'application/vnd.oci.image.config.v1+json'; | ||
ALTER TABLE artifact ALTER COLUMN media_type SET NOT NULL; | ||
*/ |
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.