Skip to content

update-db-schema

Updates the database schema.

Syntax:

shell
sfiler-cli [options] update-db-schema [command options]
Command optionsRequired / OptionalDescription
-tvOptionnelThe targeted version of the sfiler database (do not specify to update to the latest version).
-tdOptionnelThe targeted database (config or data). This option can be used only when specifying a version (-tv option) that is below 4.13.
-upgrade-checksumsOptionnelA 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.

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

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