Skip to content

Commit

Permalink
Re-generate schema.sql to include new BOM_UPLOAD table
Browse files Browse the repository at this point in the history
Signed-off-by: nscuro <[email protected]>
  • Loading branch information
nscuro committed Sep 20, 2024
1 parent 77b6bcb commit 1baaaf5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 9 additions & 0 deletions commons-persistence/src/main/resources/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,12 @@ ALTER TABLE public."BOM" ALTER COLUMN "ID" ADD GENERATED BY DEFAULT AS IDENTITY
CACHE 1
);

CREATE TABLE public."BOM_UPLOAD" (
"TOKEN" uuid NOT NULL,
"UPLOADED_AT" timestamp with time zone NOT NULL,
"BOM" bytea NOT NULL
);

CREATE TABLE public."COMPONENT" (
"ID" bigint NOT NULL,
"BLAKE2B_256" character varying(64),
Expand Down Expand Up @@ -2101,6 +2107,9 @@ ALTER TABLE ONLY public."APIKEY"
ALTER TABLE ONLY public."BOM"
ADD CONSTRAINT "BOM_PK" PRIMARY KEY ("ID");

ALTER TABLE ONLY public."BOM_UPLOAD"
ADD CONSTRAINT "BOM_UPLOAD_PK" PRIMARY KEY ("TOKEN");

ALTER TABLE ONLY public."BOM"
ADD CONSTRAINT "BOM_UUID_IDX" UNIQUE ("UUID");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ void beforeEach() throws Exception {
@Override
protected void customizeApiServerContainer(final GenericContainer<?> container) {
container
.withEnv("BOM_UPLOAD_STORAGE_DEFAULT_EXTENSION", "s3")
// Ensure other storage extensions are disabled.
.withEnv("BOM_UPLOAD_STORAGE_EXTENSION_DATABASE_ENABLED", "false")
.withEnv("BOM_UPLOAD_STORAGE_EXTENSION_LOCAL_ENABLED", "false")
// Enable and configure S3 storage extension.
.withEnv("BOM_UPLOAD_STORAGE_EXTENSION_S3_ENABLED", "true")
.withEnv("BOM_UPLOAD_STORAGE_EXTENSION_S3_ENDPOINT", "http://minio:9000")
.withEnv("BOM_UPLOAD_STORAGE_EXTENSION_S3_BUCKET", BOM_UPLOAD_BUCKET_NAME)
Expand Down

0 comments on commit 1baaaf5

Please sign in to comment.