Reputation: 115
Imagine I have added a new field called token in my CarV2 State (version 2) & suppose token's value populated should be existing field value = carNo+10.
My thought process, is in liquibase schema script for version2 of CarV2 State, we just need to add a new column & the data that needs to be populated in schema table will be handled in State Migration transaction inside Corda (means new state in migration txn of CarStateV2 can be created with this logic).
Is that correct? Or should I need to add a DML operation command after the column addition changeset in liquibase script of version 2 itself for this (carNo+10) logic?
Upvotes: 0
Views: 756
Reputation: 115
My understanding for the migration scenario which I verified in slack channel is:
Case1 : If the field added is there in state and in schema table (means mapping is there between them) then, logic for data population for version 2 release should be handled in a corda transaction for statev1 to v2 and along with that this schema table data will also be updated. (Then dont need any liquibase dml scripts for v2)
Case2 : if we need to add and populate some field in schema table alone. Which is not mapped in state, then its data population for version 2 release should be handled in liquibase version2.xml file with proper logic.
Upvotes: 0