mirror of
https://github.com/corda/corda.git
synced 2024-12-30 01:39:04 +00:00
ENT-10122: Made the consuming tx id field nullable, added missing changelog file.
This commit is contained in:
parent
669d6590af
commit
60bb4c58f2
@ -231,7 +231,7 @@ class NodeVaultService(
|
||||
if (stateStatus != Vault.StateStatus.CONSUMED) {
|
||||
stateStatus = Vault.StateStatus.CONSUMED
|
||||
consumedTime = clock.instant()
|
||||
consumingTxId = update.consumingTxIds[stateRef]?.toString() ?: ""
|
||||
consumingTxId = update.consumingTxIds[stateRef]?.toString()
|
||||
// remove lock (if held)
|
||||
if (lockId != null) {
|
||||
lockId = null
|
||||
|
@ -94,8 +94,8 @@ object VaultSchemaV1 : MappedSchema(
|
||||
var constraintData: ByteArray? = null,
|
||||
|
||||
/** consuming transaction */
|
||||
@Column(name = "consuming_tx_id", length = 144, nullable = false)
|
||||
var consumingTxId: String = ""
|
||||
@Column(name = "consuming_tx_id", length = 144, nullable = true)
|
||||
var consumingTxId: String? = null
|
||||
) : PersistentState()
|
||||
|
||||
@Entity
|
||||
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
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-3.5.xsd">
|
||||
<changeSet author="R3.Corda" id="add_consuming_tx_id_column">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="vault_states" columnName="consuming_tx_id"/>
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="vault_states">
|
||||
<column name="consuming_tx_id" type="NVARCHAR(144)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
Loading…
Reference in New Issue
Block a user