From e24476b8443c8761f0d66f1f3c9f839242533b6e Mon Sep 17 00:00:00 2001 From: nkovacsx Date: Tue, 26 Sep 2023 15:30:20 +0100 Subject: [PATCH 01/11] CORE-16183 Initial UTXO Ledger schema updates --- .../migration/ledger-utxo-creation-v5.1.xml | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml b/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml index e46d4e1b59..78956911c6 100644 --- a/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml +++ b/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml @@ -15,6 +15,94 @@ tableName="utxo_transaction_output"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UPDATE utxo_transaction_output txo + SET + custom_representation = ( + SELECT custom_representation from utxo_visible_transaction_state vts + WHERE vts.transaction_id=txo.transaction_id + AND vts.group_idx=txo.group_idx + AND vts.leaf_idx=txo.leaf_idx + ), + consumed = ( + SELECT consumed from utxo_visible_transaction_state vts + WHERE vts.transaction_id=txo.transaction_id + AND vts.group_idx=txo.group_idx + AND vts.leaf_idx=txo.leaf_idx + ); + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 7b42f91e337e5ec47ad95ea8901edb7d5fc69a01 Mon Sep 17 00:00:00 2001 From: nkovacsx Date: Thu, 28 Sep 2023 15:53:51 +0100 Subject: [PATCH 02/11] vbump --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index d2908e1b60..f4e58dbab4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ cordaProductVersion = 5.1.0 # NOTE: update this each time this module contains a breaking change ## NOTE: currently this is a top level revision, so all API versions will line up, but this could be moved to ## a per module property in which case module versions can change independently. -cordaApiRevision = 25 +cordaApiRevision = 26 # Main kotlinVersion = 1.8.21 From 8f0782fedceafb3ce8881b690add32990524bfa2 Mon Sep 17 00:00:00 2001 From: nkovacsx Date: Mon, 2 Oct 2023 14:04:50 +0100 Subject: [PATCH 03/11] typo and formatting --- .../migration/ledger-utxo-creation-v5.1.xml | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml b/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml index 78956911c6..3a606e63e4 100644 --- a/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml +++ b/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml @@ -3,12 +3,17 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd"> + + + + + - - - + + + - - - - - - - From 326e89998bd56702bb177684f5717b545e9f906e Mon Sep 17 00:00:00 2001 From: nkovacsx Date: Mon, 2 Oct 2023 16:17:45 +0100 Subject: [PATCH 04/11] vbump --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index f4e58dbab4..71ee4f7d4a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ cordaProductVersion = 5.1.0 # NOTE: update this each time this module contains a breaking change ## NOTE: currently this is a top level revision, so all API versions will line up, but this could be moved to ## a per module property in which case module versions can change independently. -cordaApiRevision = 26 +cordaApiRevision = 27 # Main kotlinVersion = 1.8.21 From c412809fdb1ae7ddff948eb3476005261fce7c97 Mon Sep 17 00:00:00 2001 From: nkovacsx Date: Tue, 3 Oct 2023 09:48:05 +0100 Subject: [PATCH 05/11] Move index to new table utxo_visible_transaction_output --- .../migration/ledger-utxo-creation-v5.1.xml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml b/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml index 3a606e63e4..3ca5ae3bc3 100644 --- a/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml +++ b/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml @@ -9,11 +9,6 @@ - - - + + + + + From 5d1a31995ee1737f72f08ba1f7be8ee9d43aba18 Mon Sep 17 00:00:00 2001 From: nkovacsx Date: Thu, 5 Oct 2023 09:26:43 +0100 Subject: [PATCH 06/11] vbump --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 6aa6039b3f..46c05bffb8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ cordaProductVersion = 5.1.0 # NOTE: update this each time this module contains a breaking change ## NOTE: currently this is a top level revision, so all API versions will line up, but this could be moved to ## a per module property in which case module versions can change independently. -cordaApiRevision = 28 +cordaApiRevision = 29 # Main kotlinVersion = 1.8.21 From 0699b7ec1915ad416333b4d01fdb669cc4db97d2 Mon Sep 17 00:00:00 2001 From: nkovacsx Date: Fri, 6 Oct 2023 16:10:00 +0100 Subject: [PATCH 07/11] vbump --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 69c1c3463c..9553f8d66b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ cordaProductVersion = 5.1.0 # NOTE: update this each time this module contains a breaking change ## NOTE: currently this is a top level revision, so all API versions will line up, but this could be moved to ## a per module property in which case module versions can change independently. -cordaApiRevision = 29 +cordaApiRevision = 30 # Main kotlinVersion = 1.8.21 From a68033d6f4f6ec401c583c7ca942474fb214d7cd Mon Sep 17 00:00:00 2001 From: nkovacsx Date: Fri, 6 Oct 2023 16:11:01 +0100 Subject: [PATCH 08/11] indent --- .../migration/ledger-utxo-creation-v5.1.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml b/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml index 26f193b0ac..a5a4a2f87f 100644 --- a/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml +++ b/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml @@ -84,16 +84,16 @@ UPDATE utxo_transaction_output txo SET custom_representation = ( - SELECT custom_representation from utxo_visible_transaction_state vts - WHERE vts.transaction_id=txo.transaction_id - AND vts.group_idx=txo.group_idx - AND vts.leaf_idx=txo.leaf_idx + SELECT custom_representation from utxo_visible_transaction_state vts + WHERE vts.transaction_id=txo.transaction_id + AND vts.group_idx=txo.group_idx + AND vts.leaf_idx=txo.leaf_idx ), consumed = ( - SELECT consumed from utxo_visible_transaction_state vts - WHERE vts.transaction_id=txo.transaction_id - AND vts.group_idx=txo.group_idx - AND vts.leaf_idx=txo.leaf_idx + SELECT consumed from utxo_visible_transaction_state vts + WHERE vts.transaction_id=txo.transaction_id + AND vts.group_idx=txo.group_idx + AND vts.leaf_idx=txo.leaf_idx ); From f4660e7b3483f2a99f7154f973bb9cfd9ab8d309 Mon Sep 17 00:00:00 2001 From: nkovacsx Date: Fri, 6 Oct 2023 16:13:09 +0100 Subject: [PATCH 09/11] reduce VARCHAR size --- .../schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml b/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml index a5a4a2f87f..c172dacd21 100644 --- a/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml +++ b/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml @@ -41,7 +41,7 @@ - + From df3af0c283e43e091f6cd4fb0538eaef6c8ae81d Mon Sep 17 00:00:00 2001 From: nkovacsx Date: Mon, 9 Oct 2023 09:16:35 +0100 Subject: [PATCH 10/11] remove extra declaration --- .../vnode-vault/migration/ledger-utxo-creation-v5.1.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml b/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml index c172dacd21..f03a0923b3 100644 --- a/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml +++ b/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml @@ -3,11 +3,6 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd"> - - - - - From 614c37dca2ce1fd7b04c131d09921f6785e47fd6 Mon Sep 17 00:00:00 2001 From: nkovacsx Date: Mon, 9 Oct 2023 14:00:27 +0100 Subject: [PATCH 11/11] change data type --- .../schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml b/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml index f03a0923b3..b958807b00 100644 --- a/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml +++ b/data/db-schema/src/main/resources/net/corda/db/schema/vnode-vault/migration/ledger-utxo-creation-v5.1.xml @@ -56,7 +56,7 @@ - +