-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FULL-STACK-CHANGE: This change will fail on deploy as contracts are n…
…ot changed safely. Run npm `run test:aws:loop` before running deployment to see when it fails.
- Loading branch information
1 parent
92f156c
commit a1a8d1a
Showing
14 changed files
with
228 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
server/src/main/java/au/chrissimon/safecontractchangesdemo/AddNameRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
package au.chrissimon.safecontractchangesdemo; | ||
|
||
public class AddNameRequest { | ||
private String name; | ||
private FullNameDto fullName; | ||
|
||
public String getName() { | ||
return name; | ||
public FullNameDto getFullName() { | ||
return fullName; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
public void setFullName(FullNameDto fullName) { | ||
this.fullName = fullName; | ||
} | ||
|
||
public AddNameRequest() { | ||
super(); | ||
} | ||
|
||
public AddNameRequest(String name) { | ||
public AddNameRequest(FullNameDto fullName) { | ||
super(); | ||
this.name = name; | ||
this.fullName = fullName; | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
server/src/main/java/au/chrissimon/safecontractchangesdemo/FullName.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package au.chrissimon.safecontractchangesdemo; | ||
|
||
import jakarta.persistence.Embeddable; | ||
|
||
@Embeddable | ||
public class FullName { | ||
private String firstName; | ||
public String getFirstName() { | ||
return firstName; | ||
} | ||
private String lastName; | ||
public String getLastName() { | ||
return lastName; | ||
} | ||
public FullName() { | ||
super(); | ||
} | ||
public FullName(String firstName, String lastName) { | ||
super(); | ||
this.firstName = firstName; | ||
this.lastName = lastName; | ||
} | ||
|
||
public FullNameDto toResponse() { | ||
return new FullNameDto(getFirstName(), getLastName()); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
server/src/main/java/au/chrissimon/safecontractchangesdemo/FullNameDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package au.chrissimon.safecontractchangesdemo; | ||
|
||
public class FullNameDto { | ||
private String firstName; | ||
public String getFirstName() { | ||
return firstName; | ||
} | ||
public void setFirstName(String firstName) { | ||
this.firstName = firstName; | ||
} | ||
private String lastName; | ||
public String getLastName() { | ||
return lastName; | ||
} | ||
public void setLastName(String lastName) { | ||
this.lastName = lastName; | ||
} | ||
public FullNameDto() { | ||
super(); | ||
} | ||
public FullNameDto(String firstName, String lastName) { | ||
super(); | ||
this.firstName = firstName; | ||
this.lastName = lastName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
server/src/main/resources/db/changelog/02_add_full_name.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
databaseChangeLog: | ||
- changeSet: | ||
id: 2 | ||
author: Chris Simon | ||
changes: | ||
- addColumn: | ||
tableName: name | ||
columns: | ||
- column: | ||
name: first_name | ||
type: varchar(255) | ||
constraints: | ||
nullable: true | ||
unique: false | ||
- column: | ||
name: last_name | ||
type: varchar(255) | ||
constraints: | ||
nullable: true | ||
unique: false | ||
- dropColumn: | ||
tableName: name | ||
columns: | ||
- column: | ||
name: name |
4 changes: 3 additions & 1 deletion
4
server/src/main/resources/db/changelog/db.changelog-master.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
databaseChangeLog: | ||
- include: | ||
file: db/changelog/01_initial_schema.yml | ||
file: db/changelog/01_initial_schema.yml | ||
- include: | ||
file: db/changelog/02_add_full_name.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
server/src/test/java/au/chrissimon/safecontractchangesdemo/TestAddNameRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
package au.chrissimon.safecontractchangesdemo; | ||
|
||
public class TestAddNameRequest { | ||
private String name; | ||
private TestFullName fullName; | ||
|
||
public String getName() { | ||
return name; | ||
public TestFullName getFullName() { | ||
return fullName; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
public void setFullName(TestFullName fullName) { | ||
this.fullName = fullName; | ||
} | ||
|
||
public TestAddNameRequest() { | ||
super(); | ||
} | ||
|
||
public TestAddNameRequest(String name) { | ||
public TestAddNameRequest(TestFullName fullName) { | ||
super(); | ||
this.name = name; | ||
this.fullName = fullName; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
server/src/test/java/au/chrissimon/safecontractchangesdemo/TestFullName.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package au.chrissimon.safecontractchangesdemo; | ||
|
||
public class TestFullName { | ||
private String firstName; | ||
public String getFirstName() { | ||
return firstName; | ||
} | ||
public void setFirstName(String firstName) { | ||
this.firstName = firstName; | ||
} | ||
private String lastName; | ||
public String getLastName() { | ||
return lastName; | ||
} | ||
public void setLastName(String lastName) { | ||
this.lastName = lastName; | ||
} | ||
public TestFullName() { | ||
super(); | ||
} | ||
public TestFullName(String firstName, String lastName) { | ||
super(); | ||
this.firstName = firstName; | ||
this.lastName = lastName; | ||
} | ||
} |
Oops, something went wrong.