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

35373 Add name to molecular analysis run item #253

Merged
merged 3 commits into from
Dec 6, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public class MolecularAnalysisRunItemDto {

private String usageType;

private String name;

@JsonApiRelation
private MolecularAnalysisRunDto run;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ public class MolecularAnalysisRunItem implements DinaEntity {
@Column(name = "usage_type")
private String usageType;

@Size(max = 50)
private String name;

// eager since we need it for group-based permission
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "molecular_analysis_run_id")
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/db/changelog/db.changelog-master.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@
<include file="db/changelog/migrations/55-Add_managed_attribute.xml"/>
<include file="db/changelog/migrations/56-Add_managed_attribute_to_molecular_analysis.xml"/>
<include file="db/changelog/migrations/57-Add_quality_control_table.xml"/>
<include file="db/changelog/migrations/58-Add_name_to_MolecularAnalysisRunItem.xml"/>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://local.xsd/dbchangelog-4.4.xsd"
objectQuotingStrategy="QUOTE_ONLY_RESERVED_WORDS">

<changeSet id="58-Add_name_to_MolecularAnalysisRunItem" context="schema-change"
author="phanm">
<addColumn tableName="molecular_analysis_run_item">
<column name="name" type="VARCHAR(50)"/>
</addColumn>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public static MolecularAnalysisRunItem.MolecularAnalysisRunItemBuilder newMolecu
.uuid(UUID.randomUUID())
.createdBy("test user")
.usageType(SeqReactionDto.TYPENAME)
.name("test-name")
.run(run);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public static MolecularAnalysisRunItemDto newMolecularAnalysisRunItem() {
return MolecularAnalysisRunItemDto.builder()
.createdBy("test-user")
.usageType(SeqReactionDto.TYPENAME)
.name("test-name")
.build();
}
}
Loading