@@ -19872,6 +19872,8 @@ CREATE TABLE pm_checkpoints (
19872
19872
CREATE TABLE pm_licenses (
19873
19873
id bigint NOT NULL,
19874
19874
spdx_identifier text NOT NULL,
19875
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
19876
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
19875
19877
CONSTRAINT check_c1eb81d1ba CHECK ((char_length(spdx_identifier) <= 50))
19876
19878
);
19877
19879
@@ -19886,13 +19888,27 @@ ALTER SEQUENCE pm_licenses_id_seq OWNED BY pm_licenses.id;
19886
19888
19887
19889
CREATE TABLE pm_package_version_licenses (
19888
19890
pm_package_version_id bigint NOT NULL,
19889
- pm_license_id bigint NOT NULL
19891
+ pm_license_id bigint NOT NULL,
19892
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
19893
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
19894
+ id bigint NOT NULL
19890
19895
);
19891
19896
19897
+ CREATE SEQUENCE pm_package_version_licenses_id_seq
19898
+ START WITH 1
19899
+ INCREMENT BY 1
19900
+ NO MINVALUE
19901
+ NO MAXVALUE
19902
+ CACHE 1;
19903
+
19904
+ ALTER SEQUENCE pm_package_version_licenses_id_seq OWNED BY pm_package_version_licenses.id;
19905
+
19892
19906
CREATE TABLE pm_package_versions (
19893
19907
id bigint NOT NULL,
19894
- pm_package_id bigint,
19908
+ pm_package_id bigint NOT NULL ,
19895
19909
version text NOT NULL,
19910
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
19911
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
19896
19912
CONSTRAINT check_2d8a88cfcc CHECK ((char_length(version) <= 255))
19897
19913
);
19898
19914
@@ -19909,6 +19925,8 @@ CREATE TABLE pm_packages (
19909
19925
id bigint NOT NULL,
19910
19926
purl_type smallint NOT NULL,
19911
19927
name text NOT NULL,
19928
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
19929
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
19912
19930
CONSTRAINT check_3a3aedb8ba CHECK ((char_length(name) <= 255))
19913
19931
);
19914
19932
@@ -24880,6 +24898,8 @@ ALTER TABLE ONLY plans ALTER COLUMN id SET DEFAULT nextval('plans_id_seq'::regcl
24880
24898
24881
24899
ALTER TABLE ONLY pm_licenses ALTER COLUMN id SET DEFAULT nextval('pm_licenses_id_seq'::regclass);
24882
24900
24901
+ ALTER TABLE ONLY pm_package_version_licenses ALTER COLUMN id SET DEFAULT nextval('pm_package_version_licenses_id_seq'::regclass);
24902
+
24883
24903
ALTER TABLE ONLY pm_package_versions ALTER COLUMN id SET DEFAULT nextval('pm_package_versions_id_seq'::regclass);
24884
24904
24885
24905
ALTER TABLE ONLY pm_packages ALTER COLUMN id SET DEFAULT nextval('pm_packages_id_seq'::regclass);
@@ -27115,7 +27135,7 @@ ALTER TABLE ONLY pm_licenses
27115
27135
ADD CONSTRAINT pm_licenses_pkey PRIMARY KEY (id);
27116
27136
27117
27137
ALTER TABLE ONLY pm_package_version_licenses
27118
- ADD CONSTRAINT pm_package_version_licenses_pkey PRIMARY KEY (pm_package_version_id, pm_license_id );
27138
+ ADD CONSTRAINT pm_package_version_licenses_pkey PRIMARY KEY (id );
27119
27139
27120
27140
ALTER TABLE ONLY pm_package_versions
27121
27141
ADD CONSTRAINT pm_package_versions_pkey PRIMARY KEY (id);
@@ -28701,6 +28721,8 @@ CREATE INDEX i_dast_scanner_profiles_tags_on_scanner_profiles_id ON dast_scanner
28701
28721
28702
28722
CREATE UNIQUE INDEX i_pm_licenses_on_spdx_identifier ON pm_licenses USING btree (spdx_identifier);
28703
28723
28724
+ CREATE UNIQUE INDEX i_pm_package_version_licenses_join_ids ON pm_package_version_licenses USING btree (pm_package_version_id, pm_license_id);
28725
+
28704
28726
CREATE UNIQUE INDEX i_pm_package_versions_on_package_id_and_version ON pm_package_versions USING btree (pm_package_id, version);
28705
28727
28706
28728
CREATE UNIQUE INDEX i_pm_packages_purl_type_and_name ON pm_packages USING btree (purl_type, name);
0 commit comments