diff --git a/dbrepo-metadata-db/1_setup-schema.sql b/dbrepo-metadata-db/1_setup-schema.sql index d52cb4cae88dffa827432d0e0befee8e273589e8..b6b3b7bf89a8140950f1bf11768911bcc9fb6977 100644 --- a/dbrepo-metadata-db/1_setup-schema.sql +++ b/dbrepo-metadata-db/1_setup-schema.sql @@ -369,7 +369,7 @@ CREATE TABLE IF NOT EXISTS `mdb_view_columns` d BIGINT UNSIGNED, is_null_allowed BOOLEAN NOT NULL DEFAULT true, PRIMARY KEY (id), - FOREIGN KEY (view_id) REFERENCES mdb_view (id), + FOREIGN KEY (view_id) REFERENCES mdb_view (id) ON DELETE CASCADE, UNIQUE (view_id, internal_name) ) WITH SYSTEM VERSIONING; diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/ViewColumn.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/ViewColumn.java index 5016630500cc2b792cacc5df8ec5e58c8ca610b4..10ac29d8e65eaa15ba592919ac014e452a87a06a 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/ViewColumn.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/ViewColumn.java @@ -12,6 +12,7 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener; @ToString @AllArgsConstructor @NoArgsConstructor +@EqualsAndHashCode(onlyExplicitlyIncluded = true) @EntityListeners(AuditingEntityListener.class) @jakarta.persistence.Table(name = "mdb_view_columns", uniqueConstraints = { @UniqueConstraint(columnNames = {"view_id", "internal_name"}) diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/impl/DataServiceGatewayImpl.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/impl/DataServiceGatewayImpl.java index 0c11de442957cbc6deee1d20d7f51b865017a90b..709537862a77b5bb6bccb5be4cae5d26f5622121 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/impl/DataServiceGatewayImpl.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/impl/DataServiceGatewayImpl.java @@ -214,7 +214,7 @@ public class DataServiceGatewayImpl implements DataServiceGateway { public ViewDto createView(Long databaseId, ViewCreateDto data) throws DataServiceConnectionException, DataServiceException { final ResponseEntity<ViewDto> response; final String path = "/api/database/" + databaseId + "/view"; - log.trace("delete table at endpoint {} with path {}", gatewayConfig.getDataEndpoint(), path); + log.trace("create view at endpoint {} with path {}", gatewayConfig.getDataEndpoint(), path); try { response = restTemplate.exchange(path, HttpMethod.POST, new HttpEntity<>(data), ViewDto.class); } catch (HttpServerErrorException e) { @@ -264,6 +264,7 @@ public class DataServiceGatewayImpl implements DataServiceGateway { QueryNotFoundException { final ResponseEntity<QueryDto> response; final String path = "/api/database/" + databaseId + "/subset/" + queryId; + log.trace("find subset at endpoint {} with path {}", gatewayConfig.getDataEndpoint(), path); try { response = restTemplate.exchange(path, HttpMethod.GET, HttpEntity.EMPTY, QueryDto.class); } catch (HttpServerErrorException e) { @@ -291,6 +292,7 @@ public class DataServiceGatewayImpl implements DataServiceGateway { DataServiceException, QueryNotFoundException { final ResponseEntity<ExportResourceDto> response; final String path = "/api/database/" + databaseId + "/subset/" + queryId; + log.trace("export subset at endpoint {} with path {}", gatewayConfig.getDataEndpoint(), path); try { response = restTemplate.exchange(path, HttpMethod.GET, HttpEntity.EMPTY, ExportResourceDto.class); } catch (HttpServerErrorException e) { @@ -315,6 +317,7 @@ public class DataServiceGatewayImpl implements DataServiceGateway { TableNotFoundException { final ResponseEntity<TableDto[]> response; final String path = "/api/database/" + databaseId + "/table"; + log.trace("get table schemas at endpoint {} with path {}", gatewayConfig.getDataEndpoint(), path); try { response = restTemplate.exchange(path, HttpMethod.GET, HttpEntity.EMPTY, TableDto[].class); } catch (HttpServerErrorException e) { diff --git a/dbrepo-ui/pages/index.vue b/dbrepo-ui/pages/index.vue index 93c48e189938bd75ff9c93c956163de0a18379ca..037f5b9410f316cce4e24ec2a9d45c6d6615a741 100644 --- a/dbrepo-ui/pages/index.vue +++ b/dbrepo-ui/pages/index.vue @@ -11,7 +11,7 @@ prepend-icon="mdi-plus" variant="flat" :text="$t('toolbars.database.create.text')" - color="primary" + color="secondary" @click.stop="dialog = true" /> </v-toolbar> <DatabaseList diff --git a/dbrepo-ui/pages/search.vue b/dbrepo-ui/pages/search.vue index b2d0f0219515530ac47b84342c66561ba117a288..ebe16ecec1c159de639a6c735b8f806dda1da21f 100644 --- a/dbrepo-ui/pages/search.vue +++ b/dbrepo-ui/pages/search.vue @@ -10,7 +10,7 @@ v-if="canCreateDatabase" class="mr-4" prepend-icon="mdi-plus" - color="primary" + color="secondary" variant="flat" @click.stop="createDbDialog = true"> {{ $t('toolbars.database.create.text') }}