Skip to content

Commit

Permalink
refactor(dao): LetterSoundCorrespondencePeerReviewEvent#letterSoundCo…
Browse files Browse the repository at this point in the history
…ntributionEvent

refs #1677
  • Loading branch information
jo-elimu committed Jul 13, 2024
1 parent 28dac27 commit 4f024f6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ public class LetterSoundCorrespondencePeerReviewEvent extends PeerReviewEvent {
*/
@NotNull
@ManyToOne
private LetterSoundCorrespondenceContributionEvent letterSoundCorrespondenceContributionEvent;
private LetterSoundCorrespondenceContributionEvent letterSoundContributionEvent;

public LetterSoundCorrespondenceContributionEvent getLetterSoundCorrespondenceContributionEvent() {
return letterSoundCorrespondenceContributionEvent;
public LetterSoundCorrespondenceContributionEvent getLetterSoundContributionEvent() {
return letterSoundContributionEvent;
}

public void setLetterSoundCorrespondenceContributionEvent(LetterSoundCorrespondenceContributionEvent letterSoundCorrespondenceContributionEvent) {
this.letterSoundCorrespondenceContributionEvent = letterSoundCorrespondenceContributionEvent;
public void setLetterSoundContributionEvent(LetterSoundCorrespondenceContributionEvent letterSoundContributionEvent) {
this.letterSoundContributionEvent = letterSoundContributionEvent;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public String handleSubmit(
// Store the peer review event
LetterSoundCorrespondencePeerReviewEvent letterSoundPeerReviewEvent = new LetterSoundCorrespondencePeerReviewEvent();
letterSoundPeerReviewEvent.setContributor(contributor);
letterSoundPeerReviewEvent.setLetterSoundCorrespondenceContributionEvent(letterSoundContributionEvent);
letterSoundPeerReviewEvent.setLetterSoundContributionEvent(letterSoundContributionEvent);
letterSoundPeerReviewEvent.setApproved(approved);
letterSoundPeerReviewEvent.setComment(StringUtils.abbreviate(comment, 1000));
letterSoundPeerReviewEvent.setTime(Calendar.getInstance());
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/META-INF/jpa-schema-export.sql
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@
comment varchar(1000),
time datetime,
contributor_id bigint,
letterSoundCorrespondenceContributionEvent_id bigint,
letterSoundContributionEvent_id bigint,
primary key (id)
) engine=MyISAM;

Expand Down Expand Up @@ -913,8 +913,8 @@
references Contributor (id);

alter table LetterSoundCorrespondencePeerReviewEvent
add constraint FK1cxnf96s8gpl1nuartfcy5gbc
foreign key (letterSoundCorrespondenceContributionEvent_id)
add constraint FKff8dsceebikiyr8csxbxn6ml0
foreign key (letterSoundContributionEvent_id)
references LetterSoundCorrespondenceContributionEvent (id);

alter table Number_Word
Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/db/migration/2004009.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 2.4.9

# "letterSoundCorrespondenceContributionEvent" → "letterSoundContributionEvent"
ALTER TABLE `LetterSoundCorrespondencePeerReviewEvent` DROP COLUMN `letterSoundContributionEvent_id`;
ALTER TABLE `LetterSoundCorrespondencePeerReviewEvent` CHANGE `letterSoundCorrespondenceContributionEvent_id` `letterSoundContributionEvent_id` bigint(20) NOT NULL;

0 comments on commit 4f024f6

Please sign in to comment.