-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
participant-integration-api: Store a status gRPC protobuf.
Instead of storing the status code and message, we store a serialized `google.rpc.Status` protocol buffers message. This allows us to pass through any additional information reported by the driver `ReadService`. The migration is only done for the append-only database, and preserves old data in the existing columns. New data will only be written to the new column. CHANGELOG_BEGIN CHANGELOG_END
- Loading branch information
1 parent
2527ec8
commit f4d6de7
Showing
15 changed files
with
103 additions
and
64 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...n-api/src/main/resources/db/migration/h2database-appendonly/V1__Append_only_schema.sha256
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 +1 @@ | ||
0d8451829143e22581afc5b31930bb0ff8c5efab89a3eaca0ed2e57454fc6823 | ||
e64e1bc672d79af26e86ca8e495a31c6ef026ae6c6df86b3101d9d942954e745 |
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
1 change: 1 addition & 0 deletions
1
...gration-api/src/main/resources/db/migration/h2database/V31__rejection_status_proto.sha256
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 @@ | ||
854c24f32477835f23d0987036b940073cbd02bb2907ab21c48de33fc01f98e5 |
16 changes: 16 additions & 0 deletions
16
...ntegration-api/src/main/resources/db/migration/h2database/V31__rejection_status_proto.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,16 @@ | ||
-- Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
|
||
-- Store the completion status as a serialized Protocol Buffers message of type `google.rpc.Status`. | ||
|
||
-- The `rejection_status` contains a Protocol-Buffers-serialized message of type | ||
-- `google.rpc.Status`, containing the code, message, and further details (decided by the ledger | ||
-- driver). The `rejection_status_code` and `rejection_status_message` columns may contain old | ||
-- data and will always be `NULL` in a H2 ledger. | ||
|
||
ALTER TABLE participant_command_completions | ||
RENAME COLUMN status_code TO rejection_status_code; | ||
ALTER TABLE participant_command_completions | ||
RENAME COLUMN status_message TO rejection_status_message; | ||
ALTER TABLE participant_command_completions | ||
ADD COLUMN rejection_status BLOB; |
2 changes: 1 addition & 1 deletion
2
...ation-api/src/main/resources/db/migration/oracle-appendonly/V1__Append_only_schema.sha256
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 +1 @@ | ||
c6e4c74b1c854a51d9cd79d3c614b60a372ca60e88b8d69cbd90a7a674389080 | ||
fe7a5dfdffb2d43859a4deb9cd78b4fe6960a8ffb25abb36972637f45c650091 |
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
2 changes: 1 addition & 1 deletion
2
ledger/participant-integration-api/src/main/resources/db/migration/oracle/V1__Init.sha256
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 +1 @@ | ||
250ca12b5c10f57334d9c5f763bd8aab4ac564b0d6b6589ad976da404d3a2738 | ||
6ccd1b4ddaee839e06281eaacd4cb70dd88e96961a57366931b25e3c115a90cf |
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
1 change: 1 addition & 0 deletions
1
...resources/db/migration/postgres-appendonly/V106__add_rejection_status_proto_column.sha256
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 @@ | ||
454de41175e6f9d5b4a7b125ef06a57115342384b39898f85208cce572a1d4d4 |
16 changes: 16 additions & 0 deletions
16
...in/resources/db/migration/postgres-appendonly/V106__add_rejection_status_proto_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,16 @@ | ||
-- Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
|
||
-- Store the completion status as a serialized Protocol Buffers message of type `google.rpc.Status`. | ||
|
||
-- The `rejection_status` contains a Protocol-Buffers-serialized message of type | ||
-- `google.rpc.Status`, containing the code, message, and further details (decided by the ledger | ||
-- driver). We do not migrate the `rejection_status_code` and `rejection_status_message` columns, | ||
-- and so they may contain old data, which means we need to keep them. | ||
|
||
ALTER TABLE participant_command_completions | ||
RENAME COLUMN status_code TO rejection_status_code; | ||
ALTER TABLE participant_command_completions | ||
RENAME COLUMN status_message TO rejection_status_message; | ||
ALTER TABLE participant_command_completions | ||
ADD COLUMN rejection_status BYTEA; |
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
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