-
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.
Add Oracle support in the trigger service (#9286)
* Add Oracle support in the trigger service This PR migrates the ddl & queries and adds tests for this. It does not yet expose this to users. I’ll handle that in a separate PR. changelog_begin changelog_end * use getOrElse changelog_begin changelog_end
- Loading branch information
1 parent
2625953
commit f7b2f14
Showing
26 changed files
with
265 additions
and
94 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
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
Empty file.
22 changes: 22 additions & 0 deletions
22
...rs/service/src/main/resources/com/daml/lf/engine/trigger/db/migration/oracle/V1__Init.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,22 @@ | ||
-- Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
|
||
-- Running trigger table. | ||
create table running_triggers( | ||
-- a UUID generated by the service | ||
trigger_instance nvarchar2(36) primary key, | ||
-- the token corresponding to the party | ||
trigger_party nvarchar2(255) not null, | ||
-- the identifier for the trigger in its dalf, | ||
-- of the form "packageId:moduleName:triggerName" | ||
full_trigger_name nvarchar2(1000) not null | ||
); | ||
|
||
-- Dalf table with binary package data. | ||
create table dalfs( | ||
package_id nvarchar2(64) primary key, | ||
package blob not null | ||
); | ||
|
||
-- Index for efficiently listing running triggers for a particular party. | ||
create index triggers_by_party on running_triggers(trigger_party); |
1 change: 1 addition & 0 deletions
1
...ice/src/main/resources/com/daml/lf/engine/trigger/db/migration/oracle/V1__Init.sql.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 @@ | ||
6dc2d7d667ab3052662754853f3aeaaa8323ea6f14184312eef5c3ca56a90f1c |
5 changes: 5 additions & 0 deletions
5
...rc/main/resources/com/daml/lf/engine/trigger/db/migration/oracle/V2__Add_access_token.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,5 @@ | ||
-- Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
|
||
-- Add access token to running trigger table | ||
alter table running_triggers add (access_token nvarchar2(2000)); |
1 change: 1 addition & 0 deletions
1
.../resources/com/daml/lf/engine/trigger/db/migration/oracle/V2__Add_access_token.sql.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 @@ | ||
dd554429e2248ed59748bda95664e2e06edee52fdfec13a5c1c9427b78d6f897 |
7 changes: 7 additions & 0 deletions
7
.../main/resources/com/daml/lf/engine/trigger/db/migration/oracle/V3__Add_application_id.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,7 @@ | ||
-- Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
|
||
-- Add application_id to running trigger table defaulting to trigger_instance | ||
alter table running_triggers add (application_id nvarchar2(1000)); | ||
update running_triggers set application_id = trigger_instance; | ||
alter table running_triggers modify (application_id not null); |
1 change: 1 addition & 0 deletions
1
...esources/com/daml/lf/engine/trigger/db/migration/oracle/V3__Add_application_id.sql.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 @@ | ||
00569de5aaa9b0c6f6f47b97267e1385faa6c602102521ee7893ab23830a2112 |
5 changes: 5 additions & 0 deletions
5
...c/main/resources/com/daml/lf/engine/trigger/db/migration/oracle/V4__Add_refresh_token.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,5 @@ | ||
-- Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
|
||
-- Add refresh token to running trigger table | ||
alter table running_triggers add (refresh_token nvarchar2(2000)); |
1 change: 1 addition & 0 deletions
1
...resources/com/daml/lf/engine/trigger/db/migration/oracle/V4__Add_refresh_token.sql.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 @@ | ||
f1199f74901fd2af98bc0a64ce39e754389a2c6364fc0bfb6e6ee3f0732c0e49 |
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
Oops, something went wrong.