Skip to content

Commit 1baaaf5

Browse files
committed
Re-generate schema.sql to include new BOM_UPLOAD table
Signed-off-by: nscuro <[email protected]>
1 parent 77b6bcb commit 1baaaf5

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

commons-persistence/src/main/resources/schema.sql

+9
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,12 @@ ALTER TABLE public."BOM" ALTER COLUMN "ID" ADD GENERATED BY DEFAULT AS IDENTITY
915915
CACHE 1
916916
);
917917

918+
CREATE TABLE public."BOM_UPLOAD" (
919+
"TOKEN" uuid NOT NULL,
920+
"UPLOADED_AT" timestamp with time zone NOT NULL,
921+
"BOM" bytea NOT NULL
922+
);
923+
918924
CREATE TABLE public."COMPONENT" (
919925
"ID" bigint NOT NULL,
920926
"BLAKE2B_256" character varying(64),
@@ -2101,6 +2107,9 @@ ALTER TABLE ONLY public."APIKEY"
21012107
ALTER TABLE ONLY public."BOM"
21022108
ADD CONSTRAINT "BOM_PK" PRIMARY KEY ("ID");
21032109

2110+
ALTER TABLE ONLY public."BOM_UPLOAD"
2111+
ADD CONSTRAINT "BOM_UPLOAD_PK" PRIMARY KEY ("TOKEN");
2112+
21042113
ALTER TABLE ONLY public."BOM"
21052114
ADD CONSTRAINT "BOM_UUID_IDX" UNIQUE ("UUID");
21062115

e2e/src/test/java/org/dependencytrack/e2e/BomUploadProcessingWithS3StorageE2ET.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ void beforeEach() throws Exception {
6868
@Override
6969
protected void customizeApiServerContainer(final GenericContainer<?> container) {
7070
container
71-
.withEnv("BOM_UPLOAD_STORAGE_DEFAULT_EXTENSION", "s3")
71+
// Ensure other storage extensions are disabled.
72+
.withEnv("BOM_UPLOAD_STORAGE_EXTENSION_DATABASE_ENABLED", "false")
73+
.withEnv("BOM_UPLOAD_STORAGE_EXTENSION_LOCAL_ENABLED", "false")
74+
// Enable and configure S3 storage extension.
7275
.withEnv("BOM_UPLOAD_STORAGE_EXTENSION_S3_ENABLED", "true")
7376
.withEnv("BOM_UPLOAD_STORAGE_EXTENSION_S3_ENDPOINT", "http://minio:9000")
7477
.withEnv("BOM_UPLOAD_STORAGE_EXTENSION_S3_BUCKET", BOM_UPLOAD_BUCKET_NAME)

0 commit comments

Comments
 (0)