Skip to content

Commit

Permalink
#359 - Remove unused tables
Browse files Browse the repository at this point in the history
- add db migration script to remove unused tables
- remove correlating entity classes and repositories
  • Loading branch information
michael-82 committed Sep 4, 2024
1 parent 07e875e commit aea09fe
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 99 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ public class ContextualizedTermCode {
@Column(name = "termcode_id", nullable = false)
private int termCodeId;
@Basic
@Column(name = "mapping_id", nullable = true)
private Integer mappingId;
@Basic
@Column(name = "ui_profile_id", nullable = true)
private Integer uiProfileId;
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
package de.numcodex.feasibility_gui_backend.terminology.persistence;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface ContextualizedTermCodeRepository extends JpaRepository<ContextualizedTermCode, Long> {

@Query("select ct.contextTermcodeHash from CriteriaSet cs inner join ContextualizedTermCodeToCriteriaSet ctctcs on ctctcs.criteriaSetId = cs.id inner join ContextualizedTermCode ct on ctctcs.contextTermcodeHash = ct.contextTermcodeHash where ct.contextTermcodeHash in :contextTermCodeHashList and cs.url = :criteriaSetUrl")
List<String> filterByCriteriaSetUrl(@Param("criteriaSetUrl") String criteriaSetUrl,
@Param("contextTermCodeHashList") List<String> contextTermCodeHashList);
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

7 changes: 7 additions & 0 deletions src/main/resources/db/migration/V10__drop_unused_tables.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
DROP INDEX idx_mapping_name_mapping;
ALTER TABLE contextualized_termcode DROP CONSTRAINT mapping_id_fk;
ALTER TABLE contextualized_termcode DROP COLUMN mapping_id;

DROP TABLE mapping;
DROP TABLE contextualized_termcode_to_criteria_set;
DROP TABLE criteria_set;

0 comments on commit aea09fe

Please sign in to comment.