While I was trying to hash the owner_name column with this set of Liquibase Script as suggested by the Corda here
<changeSet author="My_Company" id="replace owner_name with owner_name_hash">
<addColumn tableName="iou_states">
<column name="owner_name_hash" type="nvarchar(130)"/>
</addColumn>
<update tableName="iou_states">
<column name="owner_name_hash" valueComputed="hash(owner_name)"/>
</update>
<dropColumn tableName="iou_states" columnName="owner_name"/>
I was getting the following error:
Reason: liquibase.exception.DatabaseException: Invalid parameter count for “HASH”, expected count: “2…3”; SQL statement
The reason I am not understanding here what are the other fields we need to give to the hash function.
Can any one help me with this, and provide the correct script which will do the hashing of the column in table. Many Thanks in Advance