Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #10229 added genetable version to info #10925

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<frontend.version>v6.0.14</frontend.version>

<!-- THIS SHOULD BE KEPT IN SYNC TO VERSION IN CGDS.SQL -->
<db.version>2.13.1</db.version>

<db.version>2.13.2</db.version>
<genetable.version>hgnc_v2023.10.1</genetable.version>
<!-- Version properties for dependencies that should have same version. -->
<!-- The rest can be set in the dependencyManagement section -->
<spring.social.version>1.1.6.RELEASE</spring.social.version>
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/org/cbioportal/model/Info.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ public class Info implements Serializable {
@NotNull
private String dbVersion;
@NotNull
private String genetableVersion;
@NotNull
private String gitBranch;
@NotNull
private String gitCommitId;
Expand Down Expand Up @@ -126,4 +128,12 @@ public String getDbVersion() {
public void setDbVersion(String dbVersion) {
this.dbVersion = dbVersion;
}

public String getGenetableVersion() {
return genetableVersion;
}

public void setGenetableVersion(String genetableVersion) {
this.genetableVersion = genetableVersion;
}
}
4 changes: 4 additions & 0 deletions src/main/java/org/cbioportal/web/InfoController.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public class InfoController {

@Value("${db.version}")
private String dbVersion;

@Value("${genetable.version}")
private String genetableVersion;

@Value("${git.branch:not set}")
private String gitBranch;
Expand Down Expand Up @@ -68,6 +71,7 @@ public ResponseEntity<Info> getInfo() {
Info info = new Info();
info.setPortalVersion(portalVersion);
info.setDbVersion(dbVersion);
info.setGenetableVersion(genetableVersion);
info.setGitBranch(gitBranch);
info.setGitCommitId(gitCommitId);
info.setGitCommitIdDescribe(gitCommitIdDescribe);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/db-scripts/cgds.sql
Original file line number Diff line number Diff line change
Expand Up @@ -755,5 +755,5 @@ CREATE TABLE `resource_study` (
);

-- THIS MUST BE KEPT IN SYNC WITH db.version PROPERTY IN pom.xml
INSERT INTO info VALUES ('2.13.1', NULL);
INSERT INTO info VALUES ('2.13.2', 'hgnc_v2023.10.1',NULL);

8 changes: 7 additions & 1 deletion src/main/resources/db-scripts/migration.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1027,4 +1027,10 @@ ALTER TABLE `clinical_event_data` MODIFY COLUMN `VALUE` varchar(3000) NOT NULL;
CREATE INDEX idx_clinical_event_key ON clinical_event_data (`KEY`);
CREATE INDEX idx_clinical_event_value ON clinical_event_data (`VALUE`);
CREATE INDEX idx_sample_stable_id ON sample (`STABLE_ID`);
UPDATE `info` SET `DB_SCHEMA_VERSION`="2.13.1";
UPDATE `info` SET `DB_SCHEMA_VERSION`="2.13.1";


##version: 2.13.2
ALTER TABLE `info` ADD COLUMN `GENE_TABLE_VERSION` varchar(24);
UPDATE `info` SET `GENE_TABLE_VERSION`="hgnc_v2023.10.1";
UPDATE `info` SET `DB_SCHEMA_VERSION`="2.13.2";
3 changes: 2 additions & 1 deletion src/main/resources/maven.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[email protected]@
[email protected]@
# this is the *expected* DB version (expected by the code). Don't set it manually, it is filled by maven:
[email protected]@
[email protected]@
[email protected]@