generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PO-1028 and 1054 to modify DRAFT_ACCOUNTS table to add validated_by_n…
…ame column and indexes
- Loading branch information
1 parent
2fe6264
commit 9435559
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
src/main/resources/db/migration/allEnvs/V20250113_296__add_validated_by_name_column.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,19 @@ | ||
/** | ||
* OPAL Program | ||
* | ||
* MODULE : add_validated_by_name_column.sql | ||
* | ||
* DESCRIPTION : Add new column validated_by_name to the DRAFT_ACCOUNTS table | ||
* | ||
* VERSION HISTORY: | ||
* | ||
* Date Author Version Nature of Change | ||
* ---------- ------- -------- -------------------------------------------------------------------- | ||
* 13/01/2025 A Dennis 1.0 PO-1028 Add new column validated_by_name to the DRAFT_ACCOUNTS table | ||
* | ||
**/ | ||
|
||
ALTER TABLE draft_accounts | ||
ADD COLUMN validated_by_name varchar(100); | ||
|
||
COMMENT ON COLUMN draft_accounts.validated_by_name IS 'Name value of the validating user from the AAD Access Token'; |
18 changes: 18 additions & 0 deletions
18
src/main/resources/db/migration/allEnvs/V20250113_297__index_draft_accounts_columns.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,18 @@ | ||
/** | ||
* OPAL Program | ||
* | ||
* MODULE : index_draft_accounts_columns.sql | ||
* | ||
* DESCRIPTION : Create indexes on columns in DRAFT_ACCOUNTS table used by the backend for searches. | ||
* | ||
* VERSION HISTORY: | ||
* | ||
* Date Author Version Nature of Change | ||
* ---------- ------- -------- ------------------------------------------------------------------------------------------ | ||
* 13/01/2025 A Dennis 1.0 PO-1054 Create indexes on columns in DRAFT_ACCOUNTS table used by the backend for searches. | ||
**/ | ||
CREATE INDEX IF NOT EXISTS da_business_unit_id_idx ON draft_accounts(business_unit_id); | ||
CREATE INDEX IF NOT EXISTS da_account_status_idx ON draft_accounts(account_status); | ||
CREATE INDEX IF NOT EXISTS da_submitted_by_idx ON draft_accounts(submitted_by); | ||
CREATE INDEX IF NOT EXISTS da_submitted_by_name_idx ON draft_accounts(submitted_by_name); | ||
CREATE INDEX IF NOT EXISTS da_account_status_date_idx ON draft_accounts(account_status_date); |