Use this task to load an OpenEdge database schema file to a database.

Methods

Method Description Example
exclude(String... excludes) Adds an ANT-style exclude pattern. exclude('**/*.txt', '**/*.conf')
include(String... includes) Adds an ANT-style include pattern. include('**/*.df')
source(String... sources)

The schema (.df) files to be loaded. Adds sources to this task after the include and exclude patterns are applied.

The task is skipped if no sources are present.

source('myDb.df', 'src/schema')
dbConnection(Closure connection)

Adds database configurations. The argument should be provided as a closure with its object following the structure supported by DBConnection task type.

Note that braces can be removed following Java/Groovy syntax.

dbConnection{ dbName = 'sports2000' connectionParameters='-S 8000'}
dbConnectionReferenceId(String... refIds)

Adds database tasks' references. Reference the id property of the DBConnection tasks for more information.

Note that you mustadd the Database task dependency to this (compile task).

dbConnectionReferenceId("id1", "id2")
arguments(Map args)

Additional arguments for dtaabases.

(These arguments are directly passed to PCT.)

arguments([k1:"v1", k2:'v2'])

Properties

Property Required? Description Example Default value
onlineChanges No Relaxes requirements in order to apply online changes (use SESSION:SCHEMA-CHANGE = 'NEW OBJECTS'). onlineChanges=true false

Sample code snippet

The following code snippet is an example using LoadDBSchema:
task loadSports2000Schema(type: LoadDBSchema){
    source("myDb.df")
    onlineChanges = true
    dbConnection{
        dbName="db/sports2020/sports2020"
        connectionParameters = "-1"
    }
}