Added back Liquibase script for FungibleState (#1526)

Added back Liquibase script for FungibleState column change to nullable/ commit dd60ae2 with modification to run for H2 database only. For standalone databases the column `vault_fungible_states .issuer_ref `was always nullable, however using H2 db from OS it could be not null (as it was created from JPA annotations) .
This commit is contained in:
szymonsztuka 2018-11-03 10:36:20 +00:00 committed by GitHub
parent ffa1adb5d4
commit 241c045bb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -10,5 +10,6 @@
<include file="migration/vault-schema.changelog-v5.xml"/>
<include file="migration/vault-schema.changelog-v6.xml"/>
<include file="migration/vault-schema.changelog-pkey-swap.xml"/>
<include file="migration/vault-schema.changelog-v7.xml"/>
</databaseChangeLog>

View File

@ -0,0 +1,9 @@
<?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">
<!-- Enterprise only check: for standalone databases the field was always nullable, run the changeset for H2 database only. -->
<changeSet author="R3.Corda" id="make_issuer_ref_nullable" dbms="h2">
<dropNotNullConstraint columnDataType="varbinary(512)" columnName="issuer_ref" tableName="vault_fungible_states"/>
</changeSet>
</databaseChangeLog>