Feature target metadata (#757)

* Defined the model for target matadata and the corresponding repository layer/management
* Added target metadata quotas incl enforcement
* Extended Target Mgmt REST API to allow for metadata CRUD operations
* Added migration scripts for each database
* Added back reference to target metadata in JpaTarget
* Added tests for target management, Mgmt REST API, target metadata RSQL, and REST documentation
* Updated asciidocs for target rest documentation
* Fix Allure imports and annotations
* Fix review findings

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
This commit is contained in:
Bondar Bogdan
2018-10-29 11:28:34 +01:00
committed by Stefan Behl
parent 1cbde47370
commit 0cf4f8e8b9
37 changed files with 1886 additions and 216 deletions

View File

@@ -0,0 +1,9 @@
CREATE TABLE sp_target_metadata
(
meta_key VARCHAR(128) NOT NULL,
meta_value VARCHAR(4000),
target_id BIGINT NOT NULL,
PRIMARY KEY (meta_key, target_id)
);
ALTER TABLE sp_target_metadata ADD CONSTRAINT fk_metadata_target FOREIGN KEY (target_id) REFERENCES sp_target (id) ON DELETE CASCADE;

View File

@@ -0,0 +1,12 @@
create table sp_target_metadata (
meta_key varchar(128) not null,
meta_value varchar(4000),
target_id bigint not null,
primary key (target_id, meta_key)
);
alter table sp_target_metadata
add constraint fk_metadata_target
foreign key (target_id)
references sp_target
on delete cascade;

View File

@@ -0,0 +1,12 @@
create table sp_target_metadata (
meta_key varchar(128) not null,
meta_value varchar(4000),
target_id bigint not null,
primary key (target_id, meta_key)
);
alter table sp_target_metadata
add constraint fk_metadata_target
foreign key (target_id)
references sp_target (id)
on delete cascade;

View File

@@ -0,0 +1,9 @@
CREATE TABLE sp_target_metadata
(
meta_key VARCHAR(128) NOT NULL,
meta_value VARCHAR(4000) NULL,
target_id NUMERIC(19) NOT NULL,
PRIMARY KEY (meta_key, target_id)
);
ALTER TABLE sp_target_metadata ADD CONSTRAINT fk_metadata_target FOREIGN KEY (target_id) REFERENCES sp_target (id) ON DELETE CASCADE;