Skip to content

update-db-schema ​

Updates the database schema.

Syntax:

shell
sfiler-config-cli [options] update-db-schema [command options]
Command optionsRequired / OptionalDescription
-tvOptionalThe targeted version of the S-Filer Portal database (do not specify to update to the latest version).
-tdOptionalThe targeted database (config or data). This option can be used only when specifying a version (-tv option) that is below 4.13.
-upgrade-checksumsOptionalA flag indicating if the checksum of all existing changesets must be upgraded.

Use of this command is required when the following error message is displayed in the server log file:

shell
2024-08-16 08:17:48,695 ERROR [WrapperListener_start_runner][com.okiok.sfiler.Server][][] - Failed to start server
com.okiok.sfiler.commons.ConfigurationException: Database schema needs to be updated before server can be started.

When -tv is not specified, the command also creates the system signature key if the database does not have one. Since version 4.21.0, the server does the same at startup, which covers a schema brought up to date by the automatic update (cfg.server.local.config.database.auto.update.schema).

The use of -tv and -td parameters is only useful during complex migration processes and is not required for normal updates.

Example:

shell
./sfiler-config-cli.sh -l my-user -p my-password -cf "conf/sfiler.conf" update-db-schema
shell
.\sfiler-config-cli.bat -l my-user -p my-password -cf "conf\sfiler.conf" update-db-schema

Using the -upgrade-checksums parameter is useful for updating the checksum of all existing changesets. This option is useful in cases where a changeset has been modified after its initial execution. When this option is used, all values in the MD5SUM column are reset to NULL before being recalculated.

shell
./sfiler-config-cli.sh -l my-user -p my-password -cf "conf/sfiler.conf" update-db-schema -upgrade-checksums
shell
.\sfiler-config-cli.bat -l my-user -p my-password -cf "conf\sfiler.conf" update-db-schema -upgrade-checksums