diff --git a/.gitignore b/.gitignore index 07c4142..1ca7b04 100644 --- a/.gitignore +++ b/.gitignore @@ -52,4 +52,7 @@ target/ build/ ### VS Code ### -.vscode/ \ No newline at end of file +.vscode/ + +### Local dev ### +**/application-local.yaml \ No newline at end of file diff --git a/api/.gitignore b/api/.gitignore deleted file mode 100644 index 07c4142..0000000 --- a/api/.gitignore +++ /dev/null @@ -1,55 +0,0 @@ -# Compiled class file -*.class - -# Log file -*.log - -# BlueJ files -*.ctxt - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.jar -*.war -*.nar -*.ear -*.zip -*.tar.gz -*.rar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - -HELP.md -target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/** -!**/src/test/** - -### STS ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans -.sts4-cache - -### IntelliJ IDEA ### -.idea -*.iws -*.iml -*.ipr - -### NetBeans ### -/nbproject/private/ -/nbbuild/ -/dist/ -/nbdist/ -/.nb-gradle/ -build/ - -### VS Code ### -.vscode/ \ No newline at end of file diff --git a/api/pom.xml b/api/pom.xml index b1b116a..4f75988 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -6,7 +6,7 @@ ca.bc.gov.educ educ-grad-student-graduation-api - 1.8.44 + 1.8.45 educ-grad-student-graduation-api Ministry of Education GRAD STUDENT GRADUATION API diff --git a/api/src/main/java/ca/bc/gov/educ/api/studentgraduation/model/dto/LetterGrade.java b/api/src/main/java/ca/bc/gov/educ/api/studentgraduation/model/dto/LetterGrade.java index 2e555ed..f7693f7 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/studentgraduation/model/dto/LetterGrade.java +++ b/api/src/main/java/ca/bc/gov/educ/api/studentgraduation/model/dto/LetterGrade.java @@ -1,11 +1,9 @@ package ca.bc.gov.educ.api.studentgraduation.model.dto; -import org.springframework.stereotype.Component; - import lombok.Data; import lombok.EqualsAndHashCode; +import org.springframework.stereotype.Component; -import jakarta.persistence.Column; import java.util.Date; @Data @@ -21,6 +19,7 @@ public class LetterGrade extends BaseModel { private Integer percentRangeHigh; private Integer percentRangeLow; private Date expiryDate; + private Date effectiveDate; @Override public String toString() { @@ -33,6 +32,7 @@ public String toString() { ", percentRangeHigh=" + percentRangeHigh + ", percentRangeLow=" + percentRangeLow + ", expiryDate=" + expiryDate + + ", effectiveDate=" + effectiveDate + '}'; } } diff --git a/api/src/main/java/ca/bc/gov/educ/api/studentgraduation/model/entity/LetterGradeEntity.java b/api/src/main/java/ca/bc/gov/educ/api/studentgraduation/model/entity/LetterGradeEntity.java index baf032a..e38dc5a 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/studentgraduation/model/entity/LetterGradeEntity.java +++ b/api/src/main/java/ca/bc/gov/educ/api/studentgraduation/model/entity/LetterGradeEntity.java @@ -4,11 +4,9 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; - -import org.hibernate.annotations.Immutable; - import lombok.Data; import lombok.EqualsAndHashCode; +import org.hibernate.annotations.Immutable; import java.util.Date; @@ -44,4 +42,7 @@ public class LetterGradeEntity extends BaseEntity { @Column(name = "EXPIRY_DATE", nullable = true) private Date expiryDate; + @Column(name = "EFFECTIVE_DATE", nullable = true) + private Date effectiveDate; + } \ No newline at end of file diff --git a/api/src/main/resources/application.yaml b/api/src/main/resources/application.yaml index 909d531..2724db6 100644 --- a/api/src/main/resources/application.yaml +++ b/api/src/main/resources/application.yaml @@ -79,6 +79,7 @@ server: worker: 128 io: 16 #port: ${HTTP_PORT} + max-http-request-header-size: 20000 #API Documentation springdoc: diff --git a/api/src/main/resources/db/migration/1.0/V1.0.88__DDL-ALTER_TABLE-LETTER_GRADE.sql b/api/src/main/resources/db/migration/1.0/V1.0.88__DDL-ALTER_TABLE-LETTER_GRADE.sql new file mode 100644 index 0000000..38cc476 --- /dev/null +++ b/api/src/main/resources/db/migration/1.0/V1.0.88__DDL-ALTER_TABLE-LETTER_GRADE.sql @@ -0,0 +1 @@ +ALTER TABLE LETTER_GRADE ADD EFFECTIVE_DATE DATE DEFAULT TO_DATE('2024-07-01', 'YYYY-MM-DD') NOT NULL; \ No newline at end of file diff --git a/api/src/main/resources/db/migration/1.0/V1.0.89__DML-UPDATE_TABLE-LETTER_GRADE.sql b/api/src/main/resources/db/migration/1.0/V1.0.89__DML-UPDATE_TABLE-LETTER_GRADE.sql new file mode 100644 index 0000000..268f667 --- /dev/null +++ b/api/src/main/resources/db/migration/1.0/V1.0.89__DML-UPDATE_TABLE-LETTER_GRADE.sql @@ -0,0 +1,63 @@ +UPDATE LETTER_GRADE +SET UPDATE_USER='API_STUDENT_GRADUATION' , UPDATE_DATE=SYSTIMESTAMP , EFFECTIVE_DATE=TIMESTAMP'1940-01-01 00:00:00.0' +WHERE LETTER_GRADE='A'; + +UPDATE LETTER_GRADE +SET UPDATE_USER='API_STUDENT_GRADUATION' , UPDATE_DATE=SYSTIMESTAMP , EFFECTIVE_DATE=TIMESTAMP'1940-01-01 00:00:00.0' +WHERE LETTER_GRADE='B'; + +UPDATE LETTER_GRADE +SET UPDATE_USER='API_STUDENT_GRADUATION' , UPDATE_DATE=SYSTIMESTAMP , EFFECTIVE_DATE=TIMESTAMP'1940-01-01 00:00:00.0' +WHERE LETTER_GRADE='C+'; + +UPDATE LETTER_GRADE +SET UPDATE_USER='API_STUDENT_GRADUATION' , UPDATE_DATE=SYSTIMESTAMP , EFFECTIVE_DATE=TIMESTAMP'1940-01-01 00:00:00.0' +WHERE LETTER_GRADE='C'; + +UPDATE LETTER_GRADE +SET UPDATE_USER='API_STUDENT_GRADUATION' , UPDATE_DATE=SYSTIMESTAMP , EFFECTIVE_DATE=TIMESTAMP'1940-01-01 00:00:00.0' +WHERE LETTER_GRADE='C-'; + +UPDATE LETTER_GRADE +SET UPDATE_USER='API_STUDENT_GRADUATION' , UPDATE_DATE=SYSTIMESTAMP , EFFECTIVE_DATE=TIMESTAMP'1940-01-01 00:00:00.0' +WHERE LETTER_GRADE='F'; + +UPDATE LETTER_GRADE +SET UPDATE_USER='API_STUDENT_GRADUATION' , UPDATE_DATE=SYSTIMESTAMP , EFFECTIVE_DATE=TIMESTAMP'1940-01-01 00:00:00.0' +WHERE LETTER_GRADE='I'; + +UPDATE LETTER_GRADE +SET UPDATE_USER='API_STUDENT_GRADUATION' , UPDATE_DATE=SYSTIMESTAMP , EFFECTIVE_DATE=TIMESTAMP'2006-09-01 00:00:00.0' +WHERE LETTER_GRADE='NM'; + +UPDATE LETTER_GRADE +SET UPDATE_USER='API_STUDENT_GRADUATION' , UPDATE_DATE=SYSTIMESTAMP , EFFECTIVE_DATE=TIMESTAMP'1940-01-01 00:00:00.0', EXPIRY_DATE=TIMESTAMP'1994-08-31 00:00:00.0' +WHERE LETTER_GRADE='P'; + +UPDATE LETTER_GRADE +SET UPDATE_USER='API_STUDENT_GRADUATION' , UPDATE_DATE=SYSTIMESTAMP , EFFECTIVE_DATE=TIMESTAMP'2007-09-01 00:00:00.0', EXPIRY_DATE=TIMESTAMP'2021-07-31 00:00:00.0' +WHERE LETTER_GRADE='RM'; + +UPDATE LETTER_GRADE +SET UPDATE_USER='API_STUDENT_GRADUATION' , UPDATE_DATE=SYSTIMESTAMP , EFFECTIVE_DATE=TIMESTAMP'1940-01-01 00:00:00.0' +WHERE LETTER_GRADE='SG'; + +UPDATE LETTER_GRADE +SET UPDATE_USER='API_STUDENT_GRADUATION' , UPDATE_DATE=SYSTIMESTAMP , EFFECTIVE_DATE=TIMESTAMP'1940-01-01 00:00:00.0' +WHERE LETTER_GRADE='TS'; + +UPDATE LETTER_GRADE +SET UPDATE_USER='API_STUDENT_GRADUATION' , UPDATE_DATE=SYSTIMESTAMP , EFFECTIVE_DATE=TIMESTAMP'1940-01-01 00:00:00.0' +WHERE LETTER_GRADE='W'; + +UPDATE LETTER_GRADE +SET UPDATE_USER='API_STUDENT_GRADUATION' , UPDATE_DATE=SYSTIMESTAMP , EFFECTIVE_DATE=TIMESTAMP'1940-01-01 00:00:00.0', EXPIRY_DATE=TIMESTAMP'1994-08-31 00:00:00.0' +WHERE LETTER_GRADE='WF'; + +UPDATE LETTER_GRADE +SET UPDATE_USER='API_STUDENT_GRADUATION' , UPDATE_DATE=SYSTIMESTAMP , EFFECTIVE_DATE=TIMESTAMP'2007-09-01 00:00:00.0' +WHERE LETTER_GRADE='WR'; + +UPDATE LETTER_GRADE +SET UPDATE_USER='API_STUDENT_GRADUATION' , UPDATE_DATE=SYSTIMESTAMP , EFFECTIVE_DATE=TIMESTAMP'1994-09-01 00:00:00.0', EXPIRY_DATE=TIMESTAMP'1997-08-31 00:00:00.0' +WHERE LETTER_GRADE='IP';