Database configuration
XDM uses a PostgreSQL database to store information about its configuration. This includes the defined tasks, the history of task executions, your environment configuration, your user configuration, the cached object-containers, etc.
The default configuration starts a PostgreSQL database used for persistent storage. This is configured in the docker-compose.yml file.
If you prefer to use a different PostgreSQL system for your as administration database, you need to perform the following steps:
To set the seed, you must edit the file docker-compose.yml. In the section services→core-server→environment, add the following line:
-
Edit the file docker-compose.yml.
-
Add the following parameters to the section services→core-server/dataflow-server→environment in order to configure the location and credentials for the administration database:
admin.db.url=<your-jdbc-url>
admin.db.schema=<your-schema>
admin.db.user=<your-database-user>
admin.db.password=<your-database-password>
admin.db.driver=org.postgresql.Driver
admin.db.dialect=org.hibernate.dialect.PostgreSQL81Dialect
- admin.db.url
-
:noindex: Specifies the JDBC URL of the PostgreSQL database that you want to use as administration database.
- admin.db.schema
-
:noindex: Specifies the schema name. This is set to public by default.
- admin.db.user
-
:noindex: Specifies the username that is used to access the database.
- admin.db.password
-
:noindex: Specifies the password that is used to access the database.
| The specified parameters must be added to both services core-server and dataflow-server |
Creating database tables
By default, XDM automatically creates the administration tables and sequences in the specified database system if they do not exist yet. XDM also automatically migrates its administration tables to the latest version if it is necessary. Every time XDM starts, it will generate the DDL for all tables and sequences that are missing or changed and store it in the file 'admin-db-diff.sql' inside the data directory. Since this file is newly generated at each start, it only contains the latest changes made to the administration database. With this file, users can inspect the changes made to the database compared to the previously installed version.
The automatic creation and migration of the administration database can be disabled, as described in disable automatic database migration. But in this case, the administrator has to migrate the database himself with the generated 'admin-db-diff.sql' file. This file contains the SQL statements executed by the migration system. It is also possible that the database skips some migration steps that XDM would take at startup, which are too complicated to describe as plain SQL statements.
Database user
The user ID used to create these tables and sequences is specified by the parameter admin.db.user.
This parameter is located in the file docker-compose.yml in the section services→core-server→environment.
The specified user ID must have the privilege to create tables and sequences inside the database.