Commit 8185c5ec authored by Kristel Meikas's avatar Kristel Meikas
Browse files

Merge branch 'develop' into 'master'

Release: merge 'develop' into 'master' created by Kristel Meikas

See merge request teis/files-service!59
parents ca5ffb2f 0197d623
......@@ -9,6 +9,7 @@ variables:
USE_S3: "true"
BUILD_SERVICE_PROJECT_NAME: "files-service"
BUILD_SERVICE_LIB_PROJECT_NAME: "files-service-lib"
USE_METRICS: "true"
include:
- project: "teis/dev-ops"
......
# Changelog
## [1.18.0] - 2021-03-22
* TEIS-1566: Introduced @BpmProcess annotation which maps RequestMetaDto for logging and security context via
RabbitListenerAspect
* TEIS-2041: code improvements based on Sonar analysis
* TEIS-2041: added missing USE_METRICS: "true" configuration parameter for services and gateways, which use Prometheus
monitoring
* TEIS-2056: updates for stress tests
## [1.17.0] - 2021-03-08
* TEIS-2018: added functionality to fetch all CURRENT file references via file ID
* Updated Minio client dependency to latest version; Code refactor due to MinioClient SDK breaking changes
* TEIS-2037: added Prometheus to enable hardware monitoring
......
theGroup=ee.sm.ti.teis
theVersion=1.17.0
commonsVersion=1.21.0
commonApiGatewayVersion=1.21.0
theVersion=1.18.0
commonsVersion=1.22.0
commonApiGatewayVersion=1.22.0
pluginVersion=1.3.0
schedulerVersion=1.14.0
schedulerVersion=1.15.0
......@@ -13,16 +13,25 @@ apply from: this.getClass().getClassLoader().getResource('teis.microservice.grad
dependencies {
compile project(':files-service-lib')
compile "ee.sm.ti.teis:files-client-lib:${commonsVersion}"
compile "ee.sm.ti.teis:scheduler-service-lib:${schedulerVersion}"
compile "ee.sm.ti.teis:common-api-gateway-lib:${commonApiGatewayVersion}"
compile "ee.sm.ti.teis:service-common-lib:${commonsVersion}"
compile "ee.sm.ti.teis:domain-request-lib:${commonsVersion}"
compile "ee.sm.ti.teis:service-request-lib:${commonsVersion}"
implementation "ee.sm.ti.teis:files-client-lib:${commonsVersion}"
implementation "ee.sm.ti.teis:scheduler-service-lib:${schedulerVersion}"
implementation "ee.sm.ti.teis:common-api-gateway-lib:${commonApiGatewayVersion}"
implementation "ee.sm.ti.teis:service-common-lib:${commonsVersion}"
implementation "ee.sm.ti.teis:domain-request-lib:${commonsVersion}"
implementation "ee.sm.ti.teis:service-request-lib:${commonsVersion}"
implementation "ee.sm.ti.teis:bpm-lib:${commonsVersion}"
implementation 'net.coobird:thumbnailator:0.4.12'
implementation "io.micrometer:micrometer-registry-prometheus"
integTestImplementation "ee.sm.ti.teis:files-client-lib:${commonsVersion}"
integTestImplementation "ee.sm.ti.teis:scheduler-service-lib:${schedulerVersion}"
integTestImplementation "ee.sm.ti.teis:common-api-gateway-lib:${commonApiGatewayVersion}"
integTestImplementation "ee.sm.ti.teis:service-common-lib:${commonsVersion}"
integTestImplementation "ee.sm.ti.teis:domain-request-lib:${commonsVersion}"
integTestImplementation "ee.sm.ti.teis:service-request-lib:${commonsVersion}"
integTestImplementation "ee.sm.ti.teis:bpm-lib:${commonsVersion}"
integTestImplementation 'net.coobird:thumbnailator:0.4.12'
integTestImplementation 'org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-webapp:3.2.1'
integTestImplementation 'org.springframework.boot:spring-boot-starter-webflux:2.3.4.RELEASE'
......
package ee.sm.ti.teis.file.bpm;
import ee.sm.ti.teis.bpm.BpmProcess;
import ee.sm.ti.teis.exceptions.TeisStorageException;
import ee.sm.ti.teis.file.FileEntity;
import ee.sm.ti.teis.file.pointer.FilePointerDataService;
......@@ -28,6 +29,7 @@ public class DeleteFileTask implements JavaDelegate {
private final FilePointerDataService filePointerDataService;
private final FileDataService fileDataService;
@BpmProcess
@Override
@Transactional
public void execute(DelegateExecution execution) {
......
package ee.sm.ti.teis.file.bpm;
import ee.sm.ti.teis.servicecommon.camunda.CamundaPropertiesService;
import ee.sm.ti.teis.bpm.CamundaPropertiesService;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.beans.factory.annotation.Value;
......
package ee.sm.ti.teis.file.bpm;
import ee.sm.ti.teis.bpm.BpmProcess;
import lombok.RequiredArgsConstructor;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
......@@ -11,6 +12,7 @@ import static ee.sm.ti.teis.logging.LoggingHelper.logAdminAlertError;
@RequiredArgsConstructor
public class NotifyFileDeleteTimeoutTask implements JavaDelegate {
@BpmProcess
@Override
public void execute(DelegateExecution execution) {
String businessKey = execution.getBusinessKey();
......
......@@ -3,12 +3,9 @@ package ee.sm.ti.teis.file.service;
import com.fasterxml.jackson.core.JsonProcessingException;
import ee.sm.ti.teis.commongateway.file.FileMetadataDto;
import ee.sm.ti.teis.file.FileEntity;
import ee.sm.ti.teis.file.bpm.FileDeleteProcessService;
import ee.sm.ti.teis.file.config.StorageBucketConfig;
import ee.sm.ti.teis.file.config.StorageBucketConfig.BucketConfig;
import ee.sm.ti.teis.file.domain.DeleteFile;
import ee.sm.ti.teis.file.pointer.FilePointerDataService;
import ee.sm.ti.teis.file.pointer.FilePointerEntity;
import ee.sm.ti.teis.fileclient.FileStorageBucketsConfigurationDto;
import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
import lombok.RequiredArgsConstructor;
......@@ -20,7 +17,6 @@ import java.util.List;
import java.util.UUID;
import static ee.sm.ti.teis.types.enums.FileStatusType.FAILED;
import static ee.sm.ti.teis.types.enums.ObjectStatus.DELETED;
import static java.util.stream.Collectors.toList;
@Service
......@@ -31,11 +27,11 @@ public class FileBusinessGwService {
private final FileDataService dataService;
private final FileMetadataService fileMetadataService;
private final FileMetadataExceptionService fileMetadataExceptionService;
private final FilePointerDataService filePointerDataService;
private final FileDeleteProcessService fileDeleteProcessService;
private final FileDeleteService fileDeleteService;
private final StorageBucketConfig storageBucketConfig;
public FileMetadataDto save(FileMetadataDto dto, boolean isSystemGenerated, RequestMetaDTO requestMetaDTO) throws JsonProcessingException {
public FileMetadataDto save(FileMetadataDto dto, boolean isSystemGenerated,
RequestMetaDTO requestMetaDTO) throws JsonProcessingException {
try {
return fileMetadataService.saveFileOrReturnExistingMetadata(dto, isSystemGenerated, requestMetaDTO);
} catch (Exception e) {
......@@ -54,34 +50,7 @@ public class FileBusinessGwService {
@Transactional
public void delete(DeleteFile domain, RequestMetaDTO requestMetaDTO) {
if (domain.isHardDelete()) {
fileDeleteProcessService.startProcess(domain.getFileId(), domain.getObjectId(), requestMetaDTO);
} else {
List<FilePointerEntity> filePointers = filePointerDataService.getByFileIdAndObjectId(domain.getFileId(), domain.getObjectId());
FileEntity file = dataService.getById(domain.getFileId());
deleteFileAndPointer(domain, filePointers, file);
}
}
private void deleteFileAndPointer(DeleteFile domain, List<FilePointerEntity> filePointers, FileEntity file) {
filePointers.forEach(filePointer -> {
if (filePointer.getObjectStatus() != DELETED) {
filePointer.setObjectStatus(DELETED);
filePointerDataService.save(filePointer);
}
});
List<FilePointerEntity> relatedCurrentFilePointers = filePointerDataService.getCurrentByFileId(domain.getFileId());
if (relatedCurrentFilePointers.isEmpty()) {
deleteFile(file);
} else {
log.info("File with id [{}] will not be deleted due to existing file pointer references", domain.getFileId());
}
}
private void deleteFile(FileEntity file) {
file.setObjectStatus(DELETED);
dataService.save(file);
fileDeleteService.delete(domain, requestMetaDTO);
}
public List<FileStorageBucketsConfigurationDto> getStorageBucketsConfiguration() {
......
......@@ -6,7 +6,6 @@ import ee.sm.ti.teis.domain.file.FileMetadata;
import ee.sm.ti.teis.exceptions.TeisBusinessException;
import ee.sm.ti.teis.featureflag.FeatureFlagServiceClient;
import ee.sm.ti.teis.file.FileEntity;
import ee.sm.ti.teis.file.bpm.FileDeleteProcessService;
import ee.sm.ti.teis.file.domain.DeleteFile;
import ee.sm.ti.teis.file.hash.FileHashService;
import ee.sm.ti.teis.file.pointer.FilePointerDataService;
......@@ -26,7 +25,6 @@ import static ee.sm.ti.teis.file.FileErrorCode.VIRUS_SCAN_RESULT_INFECTED;
import static ee.sm.ti.teis.file.FileErrorCode.VIRUS_SCAN_RESULT_UNCHECKED;
import static ee.sm.ti.teis.types.enums.FileScanStatusType.INFECTED;
import static ee.sm.ti.teis.types.enums.FileScanStatusType.UNCHECKED;
import static ee.sm.ti.teis.types.enums.ObjectStatus.DELETED;
@Service
@Slf4j
......@@ -37,8 +35,8 @@ public class FileBusinessMsService {
private final FileComposeService composeService;
private final FileMetadataService fileMetadataService;
private final FilePointerDataService filePointerDataService;
private final FileDeleteService fileDeleteService;
private final FeatureFlagServiceClient featureFlagServiceClient;
private final FileDeleteProcessService fileDeleteProcessService;
private final FileThumbnailBusinessService thumbnailService;
private final FileHashService hashService;
private final FileStorageServiceClient fileStorageServiceClient;
......@@ -81,13 +79,7 @@ public class FileBusinessMsService {
@Transactional
public void delete(DeleteFile domain, RequestMetaDTO requestMetaDTO) {
if (domain.isHardDelete()) {
fileDeleteProcessService.startProcess(domain.getFileId(), domain.getObjectId(), requestMetaDTO);
} else {
List<FilePointerEntity> filePointers = filePointerDataService.getByFileIdAndObjectId(domain.getFileId(), domain.getObjectId());
FileEntity file = dataService.getById(domain.getFileId());
deleteFileAndPointer(domain, filePointers, file);
}
fileDeleteService.delete(domain, requestMetaDTO);
}
@Transactional
......@@ -100,33 +92,10 @@ public class FileBusinessMsService {
} catch (Exception e) {
log.error("Unable to delete file from Minio id= {}. Error message: {}", domain.getFileId().toString(), e.getMessage());
}
if (file != null) {
dataService.delete(file);
}
}
}
private void deleteFileAndPointer(DeleteFile domain, List<FilePointerEntity> filePointers, FileEntity file) {
filePointers.forEach(filePointer -> {
if (filePointer.getObjectStatus() != DELETED) {
filePointer.setObjectStatus(DELETED);
filePointerDataService.save(filePointer);
}
});
List<FilePointerEntity> relatedCurrentFilePointers = filePointerDataService.getCurrentByFileId(domain.getFileId());
if (relatedCurrentFilePointers.isEmpty()) {
deleteFile(file);
} else {
log.info("File with id [{}] will not be deleted due to existing file pointer references", domain.getFileId());
dataService.delete(file);
}
}
private void deleteFile(FileEntity file) {
file.setObjectStatus(DELETED);
dataService.save(file);
}
public void createChecksumThumbnail(FileMetadata domain, RequestMetaDTO requestMetaDTO) {
UUID fileId = domain.getFileId();
hashService.calculateFileHash(fileId, domain.getChecksum(), domain.getBucket(), requestMetaDTO);
......
package ee.sm.ti.teis.file.service;
import ee.sm.ti.teis.file.FileEntity;
import ee.sm.ti.teis.file.bpm.FileDeleteProcessService;
import ee.sm.ti.teis.file.domain.DeleteFile;
import ee.sm.ti.teis.file.pointer.FilePointerDataService;
import ee.sm.ti.teis.file.pointer.FilePointerEntity;
import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.List;
import static ee.sm.ti.teis.types.enums.ObjectStatus.DELETED;
@Service
@Slf4j
@RequiredArgsConstructor
public class FileDeleteService {
private final FileDataService dataService;
private final FilePointerDataService filePointerDataService;
private final FileDeleteProcessService fileDeleteProcessService;
public void delete(DeleteFile domain, RequestMetaDTO requestMetaDTO) {
if (domain.isHardDelete()) {
fileDeleteProcessService.startProcess(domain.getFileId(), domain.getObjectId(), requestMetaDTO);
} else {
List<FilePointerEntity> filePointers = filePointerDataService.getByFileIdAndObjectId(domain.getFileId(), domain.getObjectId());
FileEntity file = dataService.getById(domain.getFileId());
deleteFileAndPointer(domain, filePointers, file);
}
}
private void deleteFileAndPointer(DeleteFile domain, List<FilePointerEntity> filePointers, FileEntity file) {
filePointers.forEach(filePointer -> {
if (filePointer.getObjectStatus() != DELETED) {
filePointer.setObjectStatus(DELETED);
filePointerDataService.save(filePointer);
}
});
List<FilePointerEntity> relatedCurrentFilePointers = filePointerDataService.getCurrentByFileId(domain.getFileId());
if (relatedCurrentFilePointers.isEmpty()) {
deleteFile(file);
} else {
log.info("File with id [{}] will not be deleted due to existing file pointer references", domain.getFileId());
}
}
private void deleteFile(FileEntity file) {
file.setObjectStatus(DELETED);
dataService.save(file);
}
}
package ee.sm.ti.teis.file.virusscan.bpm;
import ee.sm.ti.teis.bpm.BpmProcess;
import lombok.RequiredArgsConstructor;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
......@@ -11,6 +12,7 @@ import static ee.sm.ti.teis.logging.LoggingHelper.logAdminAlertError;
@RequiredArgsConstructor
public class NotifyVirusScanTimeoutTask implements JavaDelegate {
@BpmProcess
@Override
public void execute(DelegateExecution execution) {
String businessKey = execution.getBusinessKey();
......
......@@ -2,6 +2,7 @@ package ee.sm.ti.teis.file.virusscan.bpm;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import ee.sm.ti.teis.bpm.BpmProcess;
import ee.sm.ti.teis.domain.filesvirusscan.PollVirusScanResult;
import ee.sm.ti.teis.exceptions.TeisSystemAlertException;
import ee.sm.ti.teis.file.FileEntity;
......@@ -28,6 +29,7 @@ public class PollVirusScanResultTask implements JavaDelegate {
private final FileDataService dataService;
private final FilesVirusScanServiceClient filesVirusScanServiceClient;
@BpmProcess
@Transactional
public void execute(DelegateExecution execution) throws JsonProcessingException {
String businessKey = execution.getBusinessKey();
......
package ee.sm.ti.teis.file.virusscan.bpm;
import com.fasterxml.jackson.databind.ObjectMapper;
import ee.sm.ti.teis.bpm.BpmProcess;
import ee.sm.ti.teis.domain.file.FileMetadata;
import ee.sm.ti.teis.file.FileEntity;
import ee.sm.ti.teis.file.service.FileComposeService;
......@@ -31,6 +32,7 @@ public class UpdateVirusScanResultTask implements JavaDelegate {
private final FileComposeService fileComposeService;
private final ObjectMapper objectMapper;
@BpmProcess
@Override
@Transactional(value = REQUIRES_NEW)
public void execute(DelegateExecution execution) {
......
package ee.sm.ti.teis.file.virusscan.bpm;
import com.fasterxml.jackson.databind.ObjectMapper;
import ee.sm.ti.teis.bpm.BpmProcess;
import ee.sm.ti.teis.domain.filesvirusscan.StartVirusScan;
import ee.sm.ti.teis.exceptions.TeisSystemAlertException;
import ee.sm.ti.teis.file.FileEntity;
......@@ -29,6 +30,7 @@ public class UploadFileVirusScanTask implements JavaDelegate {
private final ObjectMapper objectMapper;
private final FilesVirusScanServiceClient filesVirusScanServiceClient;
@BpmProcess
@Override
@Transactional(value = REQUIRES_NEW)
public void execute(DelegateExecution execution) throws Exception {
......
package ee.sm.ti.teis.file.virusscan.bpm;
import ee.sm.ti.teis.servicecommon.camunda.CamundaPropertiesService;
import ee.sm.ti.teis.bpm.CamundaPropertiesService;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.beans.factory.annotation.Value;
......
......@@ -52,17 +52,19 @@ VALUES ('af1fa838-bf7f-4ec6-969e-af2904544e46', '2019-11-15 10:09:11.726442', nu
('7a5458a0-8795-4dfd-a9c6-957488a81864', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.755395', null, '240568f2-379a-4eec-8ba5-a7b8d540ffd3', 'OBJECT_TYPE__RISK_ASSESSMENT', 'be4592e4-35f6-4241-a7c8-611bfc3669d3', 'CURRENT');
-- files service picture files import test data
INSERT INTO file (id, created_at, created_by, modified_at, modified_by, name, creator_id, creator_type, size, content_type, file_status, object_status, scan_status)
VALUES ('04b8a19a-12fd-4357-a326-9c3aafe7d9f9', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'test-riskassessment-file.txt', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 1370, 'text/plain', 'ACTIVE', 'CURRENT', 'CLEAN'),
('0e5dd7d4-96ab-4fa7-9f76-11719cfbc78a', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'test-riskassessment-file.txt', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 1370, 'text/plain', 'ACTIVE', 'CURRENT', 'CLEAN'),
('1810eb59-277a-4045-814b-e2a700d97836', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'test-riskassessment-file.txt', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 1370, 'text/plain', 'ACTIVE', 'CURRENT', 'CLEAN'),
('470a5e27-82a5-41d9-ae2b-3ab9db795f17', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'test-riskassessment-file.txt', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 1370, 'text/plain', 'ACTIVE', 'CURRENT', 'CLEAN'),
('26710475-5ec7-47fc-aa56-6c0d86abfc49', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'test-riskassessment-file.txt', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 1370, 'text/plain', 'ACTIVE', 'CURRENT', 'CLEAN'),
('376cfe3d-ae9e-44b9-a4db-436e83422cb8', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'test-riskassessment-file.txt', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 1370, 'text/plain', 'ACTIVE', 'CURRENT', 'CLEAN'),
('49af9e3d-48e5-4b41-b0a9-6c0410226f3e', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'test-riskassessment-file.txt', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 1370, 'text/plain', 'ACTIVE', 'CURRENT', 'CLEAN'),
('ef2c9f1a-7b9e-40e1-bfb1-047aa6e65897', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'test-riskassessment-file.txt', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 1370, 'text/plain', 'ACTIVE', 'CURRENT', 'CLEAN'),
('08008b0d-79a3-4281-877a-ca02b032b960', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'test-riskassessment-file.txt', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 1370, 'text/plain', 'ACTIVE', 'CURRENT', 'CLEAN'),
('7c064ed8-c49a-4a5c-a035-9b6a0e253efa', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'test-riskassessment-file.txt', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 1370, 'text/plain', 'ACTIVE', 'CURRENT', 'CLEAN');
INSERT INTO file (id, created_at, created_by, modified_at, modified_by, name, creator_id, creator_type, size, content_type, file_status, object_status, scan_status, bucket, thumbnails_bucket)
VALUES ('04b8a19a-12fd-4357-a326-9c3aafe7d9f9', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'test-riskassessment-file.txt', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 1370, 'text/plain', 'ACTIVE', 'CURRENT', 'CLEAN', 'teis-riskfactor', 'teis-riskfactor-thumbnails'),
('0e5dd7d4-96ab-4fa7-9f76-11719cfbc78a', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'test-riskassessment-file.txt', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 1370, 'text/plain', 'ACTIVE', 'CURRENT', 'CLEAN', 'teis-riskfactor', 'teis-riskfactor-thumbnails'),
('1810eb59-277a-4045-814b-e2a700d97836', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'test-riskassessment-file.txt', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 1370, 'text/plain', 'ACTIVE', 'CURRENT', 'CLEAN', 'teis-riskfactor', 'teis-riskfactor-thumbnails'),
('470a5e27-82a5-41d9-ae2b-3ab9db795f17', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'test-riskassessment-file.txt', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 1370, 'text/plain', 'ACTIVE', 'CURRENT', 'CLEAN', 'teis-riskfactor', 'teis-riskfactor-thumbnails'),
('26710475-5ec7-47fc-aa56-6c0d86abfc49', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'test-riskassessment-file.txt', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 1370, 'text/plain', 'ACTIVE', 'CURRENT', 'CLEAN', 'teis-riskfactor', 'teis-riskfactor-thumbnails'),
('376cfe3d-ae9e-44b9-a4db-436e83422cb8', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'test-riskassessment-file.txt', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 1370, 'text/plain', 'ACTIVE', 'CURRENT', 'CLEAN', 'teis-riskfactor', 'teis-riskfactor-thumbnails'),
('49af9e3d-48e5-4b41-b0a9-6c0410226f3e', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'test-riskassessment-file.txt', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 1370, 'text/plain', 'ACTIVE', 'CURRENT', 'CLEAN', 'teis-riskfactor', 'teis-riskfactor-thumbnails'),
('ef2c9f1a-7b9e-40e1-bfb1-047aa6e65897', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'test-riskassessment-file.txt', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 1370, 'text/plain', 'ACTIVE', 'CURRENT', 'CLEAN', 'teis-riskfactor', 'teis-riskfactor-thumbnails'),
('08008b0d-79a3-4281-877a-ca02b032b960', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'test-riskassessment-file.txt', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 1370, 'text/plain', 'ACTIVE', 'CURRENT', 'CLEAN', 'teis-riskfactor', 'teis-riskfactor-thumbnails'),
('7c064ed8-c49a-4a5c-a035-9b6a0e253efa', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'test-riskassessment-file.txt', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 1370, 'text/plain', 'ACTIVE', 'CURRENT', 'CLEAN', 'teis-riskfactor', 'teis-riskfactor-thumbnails'),
('0ca6410d-fbf5-40b8-8bc4-1b1f7a8fdf1b', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.726442', null, 'stress-test.jpg', '5439848f-684f-4cab-84b4-4305af15cd5b', 'SYSTEM', 67758, 'image/jpeg', 'ACTIVE', 'CURRENT', 'CLEAN', 'teis-riskassessment', 'teis-riskassessment-thumbnails');
-- files service picture files import test data
INSERT INTO file_pointer (id, created_at, created_by, modified_at, modified_by, object_id, object_type, file_id, object_status)
VALUES ('e81f5cc7-3749-4f2c-af52-e14618a6c0d5', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.755395', null, '0e263e83-8389-49be-9770-941842120cce', 'OBJECT_TYPE__RISK_FACTOR', '04b8a19a-12fd-4357-a326-9c3aafe7d9f9', 'CURRENT'),
......@@ -73,4 +75,5 @@ VALUES ('e81f5cc7-3749-4f2c-af52-e14618a6c0d5', '2019-11-15 10:09:11.726442', nu
('151c7cba-2ba0-4ef4-a498-405812f5b65c', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.755395', null, '7ad585dd-1c36-4c64-aac5-ea5d5703ef8b', 'OBJECT_TYPE__RISK_FACTOR', '49af9e3d-48e5-4b41-b0a9-6c0410226f3e', 'CURRENT'),
('e34fcbfd-372d-4410-83d5-34d4465c7485', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.755395', null, '136fb14b-7418-4e43-a8fc-f3c93f8c306b', 'OBJECT_TYPE__RISK_FACTOR', 'ef2c9f1a-7b9e-40e1-bfb1-047aa6e65897', 'CURRENT'),
('3d779d82-c3a2-4434-8815-d271e4e82f7b', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.755395', null, '2b098af2-a444-47ea-afbe-7468ddcae200', 'OBJECT_TYPE__RISK_FACTOR', '08008b0d-79a3-4281-877a-ca02b032b960', 'CURRENT'),
('0468c9a0-e29f-44a0-99df-92457d78d2ea', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.755395', null, 'aee59f95-34ff-4a6e-969e-988be5cac113', 'OBJECT_TYPE__RISK_FACTOR', '7c064ed8-c49a-4a5c-a035-9b6a0e253efa', 'CURRENT');
\ No newline at end of file
('0468c9a0-e29f-44a0-99df-92457d78d2ea', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.755395', null, 'aee59f95-34ff-4a6e-969e-988be5cac113', 'OBJECT_TYPE__RISK_FACTOR', '7c064ed8-c49a-4a5c-a035-9b6a0e253efa', 'CURRENT'),
('e0fc5958-e7e2-44fb-9b90-4a1a135e3dca', '2019-11-15 10:09:11.726442', null, '2019-11-15 10:09:11.755395', null, '1cb20fb5-57d0-4991-a3ef-b9fe2ca1f786', 'OBJECT_TYPE__RISK_ASSESSMENT', '0ca6410d-fbf5-40b8-8bc4-1b1f7a8fdf1b', 'CURRENT');
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment