sqadm init-db(1)

NAME

sqadm init-db - Initialize Squore database schema

SYNOPSIS

sqadm init-db [-C] [--create-database] [--create-user] [--if-not-exists] [--section name] [-S dir] [--jdbc-url url] [--jdbc-user user] [--jdbc-password password]

DESCRIPTION

This command initializes Squore database objects. It is called automatically when installing Squore and should usually not be used after that.

Defaults parameters are taken from the standalone.xml configuration file, but most of them can be overridden on the command line for advanced use cases.

The sqadm init-db command shall be executed on a stopped Squore server, but a running database.

OPTIONS

-C, --clean

Clean (drop) database objects before recreating them.

This option is used in conjunction with --create-database (resp. --create-user) to drop the database (resp. the user) before recreating it. It is ignored otherwise.

--create-database

Create the database (PostgreSQL only).

--create-user

Create the database user.

--if-not-exists

Do not create objects when they already exist.

--section name

Only create the named section (pre-data, data, post-data or none).

This option can be specified more than once to select multiple sections. The default is to restore all sections.

-S, --sql-dir dir

Directory with SQL scripts to create schema.

--jdbc-url url

Database url of the form jdbc:subprotocol:subname.

--jdbc-user user

Database username.

--jdbc-password password

Database password, prompted if not supplied.