mirror of
https://github.com/corda/corda.git
synced 2025-06-17 06:38:21 +00:00
Rename db tables to have pt in them so states for real cash and perf test cash don't get accidentally mixed up in the db
This commit is contained in:
@ -84,7 +84,7 @@ class CashSelectionH2Impl : CashSelection {
|
|||||||
// the softLockReserve update will detect whether we try to lock states locked by others
|
// the softLockReserve update will detect whether we try to lock states locked by others
|
||||||
val selectJoin = """
|
val selectJoin = """
|
||||||
SELECT vs.transaction_id, vs.output_index, vs.contract_state, ccs.pennies, SET(@t, ifnull(@t,0)+ccs.pennies) total_pennies, vs.lock_id
|
SELECT vs.transaction_id, vs.output_index, vs.contract_state, ccs.pennies, SET(@t, ifnull(@t,0)+ccs.pennies) total_pennies, vs.lock_id
|
||||||
FROM vault_states AS vs, contract_cash_states AS ccs
|
FROM vault_states AS vs, contract_pt_cash_states AS ccs
|
||||||
WHERE vs.transaction_id = ccs.transaction_id AND vs.output_index = ccs.output_index
|
WHERE vs.transaction_id = ccs.transaction_id AND vs.output_index = ccs.output_index
|
||||||
AND vs.state_status = 0
|
AND vs.state_status = 0
|
||||||
AND ccs.ccy_code = '${amount.token}' and @t < ${amount.quantity}
|
AND ccs.ccy_code = '${amount.token}' and @t < ${amount.quantity}
|
||||||
|
@ -22,7 +22,7 @@ object CashSchema
|
|||||||
@CordaSerializable
|
@CordaSerializable
|
||||||
object CashSchemaV1 : MappedSchema(schemaFamily = CashSchema.javaClass, version = 1, mappedTypes = listOf(PersistentCashState::class.java)) {
|
object CashSchemaV1 : MappedSchema(schemaFamily = CashSchema.javaClass, version = 1, mappedTypes = listOf(PersistentCashState::class.java)) {
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "contract_cash_states",
|
@Table(name = "contract_pt_cash_states",
|
||||||
indexes = arrayOf(Index(name = "ccy_code_idx", columnList = "ccy_code"),
|
indexes = arrayOf(Index(name = "ccy_code_idx", columnList = "ccy_code"),
|
||||||
Index(name = "pennies_idx", columnList = "pennies")))
|
Index(name = "pennies_idx", columnList = "pennies")))
|
||||||
class PersistentCashState(
|
class PersistentCashState(
|
||||||
|
@ -20,7 +20,7 @@ object CommercialPaperSchema
|
|||||||
@CordaSerializable
|
@CordaSerializable
|
||||||
object CommercialPaperSchemaV1 : MappedSchema(schemaFamily = CommercialPaperSchema.javaClass, version = 1, mappedTypes = listOf(PersistentCommercialPaperState::class.java)) {
|
object CommercialPaperSchemaV1 : MappedSchema(schemaFamily = CommercialPaperSchema.javaClass, version = 1, mappedTypes = listOf(PersistentCommercialPaperState::class.java)) {
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "cp_states",
|
@Table(name = "cp_pt_states",
|
||||||
indexes = arrayOf(Index(name = "ccy_code_index", columnList = "ccy_code"),
|
indexes = arrayOf(Index(name = "ccy_code_index", columnList = "ccy_code"),
|
||||||
Index(name = "maturity_index", columnList = "maturity_instant"),
|
Index(name = "maturity_index", columnList = "maturity_instant"),
|
||||||
Index(name = "face_value_index", columnList = "face_value")))
|
Index(name = "face_value_index", columnList = "face_value")))
|
||||||
|
Reference in New Issue
Block a user