0

I added database.runMigration: true to my build.gradle file but I'm getting this error when running deployNodes. What's causing this?

[ERROR] 14:05:21+0200 [main] subcommands.ValidateConfigurationCli.logConfigurationErrors$node - Error(s) while parsing node configuration:
        - for path: "database.runMigration": Unknown property 'runMigration'

Here's my build.gradle's deployNode task

task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
    directory "./build/nodes"
    ext.drivers = ['.jdbc_driver']
    ext.extraConfig = [
            'dataSourceProperties.dataSourceClassName' : "org.postgresql.ds.PGSimpleDataSource",
            'dataSourceProperties.dataSource.user' : "corda",
            'dataSourceProperties.dataSource.password' : "corda1234",
            'database.transactionIsolationLevel' : 'READ_COMMITTED',
            'database.runMigration' : "true"
    ]
    nodeDefaults {
        projectCordapp {
            deploy = false
        }
        cordapp project(':cordapp-contracts-states')
        cordapp project(':cordapp')
    }
    node {
        name "O=HUS,L=Helsinki,C=FI"
        p2pPort 10008
        rpcSettings {
            address "localhost:10009"
            adminAddress "localhost:10049"
        }
        webPort 10017
        rpcUsers = [[ user: "user1", "password": "test", "permissions": ["ALL"]]]
        extraConfig = ext.extraConfig + [
                'dataSourceProperties.dataSource.url' :
                        "jdbc:postgresql://localhost:5432/hus_db?currentSchema=corda_schema"
        ]
        drivers = ext.drivers
    }
}

1 Answer 1

1

The database.runMigration is a Corda Enterprise property only. To control database migration in Corda Open Source use initialiseSchema.

initialiseSchema Boolean which indicates whether to update the database schema at startup (or create the schema when node starts for the first time). If set to false on startup, the node will validate if it’s running against a compatible database schema.

Default: true

You may refer to the below link to look out for other database properties which you can set.

https://docs.corda.net/corda-configuration-file.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.