-
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.
✨ (#232): New Logic and changes in the TransactionRecord
- Loading branch information
Manuel Klaus
committed
Jan 9, 2025
1 parent
bea9c4b
commit b0de5f8
Showing
9 changed files
with
135 additions
and
26 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
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
19 changes: 15 additions & 4 deletions
19
backend/app.hopps.fin/src/main/java/app/hopps/fin/jpa/entities/Address.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
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
33 changes: 33 additions & 0 deletions
33
backend/app.hopps.fin/src/main/resources/db/migration/V1.0.1__update_record.sql
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,33 @@ | ||
create sequence trade_party_sequence start with 1 increment by 1; | ||
|
||
create table trade_party | ||
( | ||
id bigint not null, | ||
city varchar(255), | ||
country varchar(255), | ||
state varchar(255), | ||
street varchar(255), | ||
streetNumber varchar(255), | ||
zipCode varchar(255), | ||
primary key (id) | ||
); | ||
|
||
alter table TransactionRecord | ||
add column privately_paid bool default false, | ||
add column document smallint default 0 not null, | ||
add column recipient_id bigint, | ||
add column sender_id bigint, | ||
add column uploader varchar(255), | ||
|
||
drop column if exists city, | ||
drop column if exists country, | ||
drop column if exists state, | ||
drop column if exists street, | ||
drop column if exists streetNumber, | ||
drop column if exists zipCode, | ||
|
||
add constraint UKlu9j69deh9wh75pnlfeaxcvjf unique (recipient_id), | ||
add constraint UKsvol64wdyce1cgdy4dfpbapa6 unique (sender_id), | ||
add constraint FKc9y0wdh9ohw1q55y03og58o3w foreign key (recipient_id) references trade_party, | ||
add constraint FK7yhrp9af6kbv73vcry7p4ot98 foreign key (sender_id) references trade_party | ||
; |
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