mirror of
https://github.com/corda/corda.git
synced 2025-04-05 02:19:09 +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:
parent
9a145a710a
commit
afac8c5728
@ -84,7 +84,7 @@ class CashSelectionH2Impl : CashSelection {
|
||||
// the softLockReserve update will detect whether we try to lock states locked by others
|
||||
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
|
||||
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
|
||||
AND vs.state_status = 0
|
||||
AND ccs.ccy_code = '${amount.token}' and @t < ${amount.quantity}
|
||||
|
@ -22,7 +22,7 @@ object CashSchema
|
||||
@CordaSerializable
|
||||
object CashSchemaV1 : MappedSchema(schemaFamily = CashSchema.javaClass, version = 1, mappedTypes = listOf(PersistentCashState::class.java)) {
|
||||
@Entity
|
||||
@Table(name = "contract_cash_states",
|
||||
@Table(name = "contract_pt_cash_states",
|
||||
indexes = arrayOf(Index(name = "ccy_code_idx", columnList = "ccy_code"),
|
||||
Index(name = "pennies_idx", columnList = "pennies")))
|
||||
class PersistentCashState(
|
||||
|
@ -20,7 +20,7 @@ object CommercialPaperSchema
|
||||
@CordaSerializable
|
||||
object CommercialPaperSchemaV1 : MappedSchema(schemaFamily = CommercialPaperSchema.javaClass, version = 1, mappedTypes = listOf(PersistentCommercialPaperState::class.java)) {
|
||||
@Entity
|
||||
@Table(name = "cp_states",
|
||||
@Table(name = "cp_pt_states",
|
||||
indexes = arrayOf(Index(name = "ccy_code_index", columnList = "ccy_code"),
|
||||
Index(name = "maturity_index", columnList = "maturity_instant"),
|
||||
Index(name = "face_value_index", columnList = "face_value")))
|
||||
|
Loading…
x
Reference in New Issue
Block a user