{
  "$schema" : "https://json-schema.org/draft/2019-09/schema",
  "$defs" : {
    "Creation" : {
      "type" : "object",
      "properties" : {
        "Enabled" : {
          "type" : "boolean",
          "description" : "If set to true, the system database will be created on startup, if it does not exist.",
          "default" : "true"
        },
        "Password" : {
          "type" : "string",
          "description" : "Password which will be taken to create the system database (only for Oracle)."
        },
        "Tablespace" : {
          "type" : "string",
          "description" : "Tablespace which will be used (only for Oracle)."
        },
        "UserName" : {
          "type" : "string",
          "description" : "Username which will be taken to create the system database (only for Oracle)."
        }
      },
      "additionalProperties" : false
    },
    "DriverProperties" : {
      "type" : "object",
      "properties" : {
        "instanceName" : {
          "type" : "string",
          "examples" : [ "SqlServer" ]
        },
        "useSSL" : {
          "type" : "boolean",
          "description" : "MySQL: Whether to use a SSL encrypted connection"
        }
      }
    }
  },
  "type" : "object",
  "properties" : {
    "Url" : {
      "description" : "JDBC URL",
      "additionalProperties" : false,
      "type" : "string",
      "examples" : [ "jdbc:postgresql://localhost:5432/AxonIvySystemDatabase", "jdbc:sqlserver://localhost:1433;databaseName=AxonIvySystemDatabase", "jdbc:mariadb://localhost:3306/AxonIvySystemDatabase", "jdbc:mysql://localhost:3306/AxonIvySystemDatabase", "jdbc:oracle:thin:@//localhost:1521/ServiceName", "jdbc:oracle:thin:@localhost:1521:ServiceId", "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ServiceName)(SERVER=DEDICATED)))" ]
    },
    "UserName" : {
      "description" : "Name of the technical user to connect to system database on behalf of the engine.",
      "additionalProperties" : false,
      "type" : "string",
      "examples" : [ "ivy", "AxonIvy", "workflowengine" ]
    },
    "Password" : {
      "type" : "string",
      "description" : "Password for the technical user (see UserName)."
    },
    "Autoconvert" : {
      "type" : "boolean",
      "description" : "If set to true, the system database is automatically converted to the latest version during startup of the Axon Ivy Engine if needed."
    },
    "BootTimeout" : {
      "type" : "integer",
      "description" : "Defines how long ivy should wait (in seconds) at startup for the db server to be available",
      "default" : "60"
    },
    "Driver" : {
      "type" : "string",
      "description" : "JDBC Driver. If not set, it is auto determined based on the JDBC URL."
    },
    "DriverProperties" : {
      "$ref" : "#/$defs/DriverProperties",
      "description" : "Additional driver specific connection properties."
    },
    "MaxConnections" : {
      "type" : "integer",
      "description" : "Maximum number of connections to the system database.",
      "default" : "50"
    },
    "Creation" : {
      "$ref" : "#/$defs/Creation"
    }
  },
  "additionalProperties" : false
}
