Skip to content

Commit 2ae8004

Browse files
committed
4.6 version bump
1 parent 01cfd10 commit 2ae8004

File tree

9 files changed

+97
-7
lines changed

9 files changed

+97
-7
lines changed

Features/constants.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
cordaReleaseGroup=net.corda
22
cordaCoreReleaseGroup=net.corda
3-
cordaVersion=4.5
4-
cordaCoreVersion=4.5
5-
gradlePluginsVersion=5.0.10
3+
cordaVersion=4.6
4+
cordaCoreVersion=4.6
5+
gradlePluginsVersion=5.0.12
66
kotlinVersion=1.2.71
77
junitVersion=4.12
88
quasarVersion=0.7.10
99
log4jVersion =2.11.2
10-
platformVersion=5
10+
platformVersion=8
1111
slf4jVersion=1.7.25
1212
nettyVersion=4.1.22.Final

Features/queryablestate-carinsurance/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
102102
}
103103
cordapp project(':contracts')
104104
cordapp project(':workflows')
105+
runSchemaMigration = true //This configuration is for any CorDapps with custom schema, We will leave this as true to avoid
106+
//problems for developers who are not familiar with Corda. If you are not using custom schemas, you can change
107+
//it to false for quicker project compiling time.
105108
}
106109
node {
107110
name "O=Notary,L=London,C=GB"

Features/queryablestate-carinsurance/contracts/src/main/java/net/corda/examples/carinsurance/schema/InsuranceSchemaV1.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
import com.google.common.collect.ImmutableList;
44
import net.corda.core.schemas.MappedSchema;
5-
5+
//4.6 changes
6+
import org.jetbrains.annotations.Nullable;
67
/**
78
* MappedSchema subclass representing the custom schema for the Insurance QueryableState.
89
*/
@@ -16,4 +17,10 @@ public InsuranceSchemaV1() {
1617
super(InsuranceSchemaFamily.class, 1, ImmutableList.of(PersistentInsurance.class,
1718
PersistentVehicle.class, PersistentClaim.class));
1819
}
20+
21+
@Nullable
22+
@Override
23+
public String getMigrationResource() {
24+
return "insurance.changelog-master";
25+
}
1926
}

Features/queryablestate-carinsurance/contracts/src/main/java/net/corda/examples/carinsurance/schema/PersistentClaim.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import javax.persistence.*;
44
import java.util.UUID;
5+
//4.6 changes
6+
import org.hibernate.annotations.Type;
57

68

79
/**
@@ -11,7 +13,7 @@
1113
@Table(name = "CLAIM_DETAIL")
1214
public class PersistentClaim {
1315

14-
@Id private final UUID id;
16+
@Id @Type (type = "uuid-char") private final UUID id;
1517
@Column private final String claimNumber;
1618
@Column private final String claimDescription;
1719
@Column private final Integer claimAmount;

Features/queryablestate-carinsurance/contracts/src/main/java/net/corda/examples/carinsurance/schema/PersistentVehicle.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
import javax.persistence.Id;
66
import javax.persistence.Table;
77
import java.util.UUID;
8+
//4.6 changes
9+
import org.hibernate.annotations.Type;
10+
811

912
/**
1013
* JPA Entity for saving vehicle details to the database table
@@ -13,7 +16,7 @@
1316
@Table(name = "VEHICLE_DETAIL")
1417
public class PersistentVehicle {
1518

16-
@Id private final UUID id;
19+
@Id @Type (type = "uuid-char") private final UUID id;
1720
@Column private final String registrationNumber;
1821
@Column private final String chasisNumber;
1922
@Column private final String make;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
2+
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
3+
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
6+
<changeSet author="R3.Corda" id="create_claim_detail_state">
7+
<createTable tableName="claim_detail">
8+
<column name="output_index" type="INT">
9+
<constraints nullable="false"/>
10+
</column>
11+
<column name="transaction_id" type="NVARCHAR(64)">
12+
<constraints nullable="false"/>
13+
</column>
14+
<column name="claimAmount" type="int"/>
15+
<column name="claimNumber" type="NVARCHAR(64)"/>
16+
<column name="claimDescription" type="NVARCHAR(64)"/>
17+
<column name="id" type="NVARCHAR(64)"/>
18+
19+
</createTable>
20+
</changeSet>
21+
</databaseChangeLog>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
2+
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
3+
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
6+
<changeSet author="R3.Corda" id="create_insurance_detail_state">
7+
<createTable tableName="insurance_detail">
8+
<column name="output_index" type="INT">
9+
<constraints nullable="false"/>
10+
</column>
11+
<column name="transaction_id" type="NVARCHAR(64)">
12+
<constraints nullable="false"/>
13+
</column>
14+
<column name="policyNumber" type="NVARCHAR(64)"/>
15+
<column name="duration" type="int"/>
16+
<column name="premium" type="int"/>
17+
<column name="insuredvalue" type="BIGINT"/>
18+
<column name="id" type="NVARCHAR(64)"/>
19+
<column name="registrationnumber" type="NVARCHAR(64)"/>
20+
21+
</createTable>
22+
</changeSet>
23+
</databaseChangeLog>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
2+
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
3+
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
6+
7+
<include file="migration/claim-detail.changelog-v1.xml"/>
8+
<include file="migration/insurance-detail.changelog-v1.xml"/>
9+
<include file="migration/vehicle-detail.changelog-v1.xml"/>
10+
11+
</databaseChangeLog>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
2+
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
3+
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
6+
<changeSet author="R3.Corda" id="create_vehicle_detail_state">
7+
<createTable tableName="vehicle_detail">
8+
9+
<column name="id" type="NVARCHAR(64)"/>
10+
<column name="registrationNumber" type="NVARCHAR(64)"/>
11+
<column name="chasisNumber" type="NVARCHAR(64)"/>
12+
<column name="make" type="NVARCHAR(64)"/>
13+
<column name="model" type="NVARCHAR(64)"/>
14+
<column name="variant" type="NVARCHAR(64)"/>
15+
<column name="color" type="NVARCHAR(64)"/>
16+
<column name="fuelType" type="NVARCHAR(64)"/>
17+
18+
</createTable>
19+
</changeSet>
20+
</databaseChangeLog>

0 commit comments

Comments
 (0)