Skip to content

Commit

Permalink
PO-641 add new column originator_id and remove column originator_refe…
Browse files Browse the repository at this point in the history
…rence (#502)

Co-authored-by: Cade Faulkner <147704481+CadeFaulkner@users.noreply.github.com>
  • Loading branch information
abrahamdennis and CadeFaulkner authored Aug 21, 2024
1 parent ab070ae commit cdf54d8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ public class DefendantAccountEntity {
@Column(name = "originator_name", length = 100)
private String originatorName;

@Column(name = "originator_reference", length = 40)
private String originatorReference;
@Column(name = "originator_id", length = 40)
private String originatorId;

@Column(name = "originator_type", length = 10)
private String originatorType;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
*
* OPAL Program
*
* MODULE : modify_defendant_accounts.sql
*
* DESCRIPTION : Modified DEFENDANT_ACCOUNTS table to add originator_id column and drop originator_reference column.
*
* VERSION HISTORY:
*
* Date Author Version Nature of Change
* ---------- -------- -------- ----------------------------------------------------------------------------------------------------------
* 20/08/2024 A Dennis 1.0 PO-641 Modified DEFENDANT_ACCOUNTS table to add originator_id column and drop originator_reference column.
*
**/

ALTER TABLE defendant_accounts
DROP COLUMN IF EXISTS originator_reference;

ALTER TABLE defendant_accounts
ADD COLUMN originator_id varchar(40);

COMMENT ON COLUMN defendant_accounts.originator_id IS 'ID of the Originator';
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void testGettersAndSetters() {
defendantAccount.setLastEnforcement("123456");
defendantAccount.setLastChangedDate(now);
defendantAccount.setOriginatorName("name");
defendantAccount.setOriginatorReference("reference");
defendantAccount.setOriginatorId("reference");
defendantAccount.setOriginatorType("type");
defendantAccount.setAllowWriteoffs(true);
defendantAccount.setAllowCheques(true);
Expand Down Expand Up @@ -77,7 +77,7 @@ public void testGettersAndSetters() {
assertEquals("123456", defendantAccount.getLastEnforcement());
assertEquals(now, defendantAccount.getLastChangedDate());
assertEquals("name", defendantAccount.getOriginatorName());
assertEquals("reference", defendantAccount.getOriginatorReference());
assertEquals("reference", defendantAccount.getOriginatorId());
assertEquals("type", defendantAccount.getOriginatorType());
assertTrue(defendantAccount.isAllowWriteoffs());
assertTrue(defendantAccount.isAllowCheques());
Expand Down

0 comments on commit cdf54d8

Please sign in to comment.