26.35. kych-eid-dbinit(1)#

26.35.1. Name#

kych-eid-dbinit - initialise and upgrade the kych-eid database schema

26.35.2. Synopsis#

kych-eid-dbinit [-c CONFIG] [-L LEVEL] [-v] [–sql-dir DIR] [-n | –dry-run] [–print-connection]

26.35.3. Description#

kych-eid-dbinit creates the kych_eid schema that kych-eid(1) keeps its identifications in, and brings an existing one up to the patch level of the installed SQL files: every schema change is a numbered patch file, kych-eid-000N.sql, registered with the Versioning bookkeeping in the _v schema, and this tool applies those the database does not have yet, in ascending order – the procedure of kych-dbinit(1) and kych-trust-dbinit(1), on kych-eid’s own database.

It is idempotent, and the Debian package runs it from its postinst on every upgrade. It does not create the database or the role; kych-eid-dbconfig(1) does that once.

26.35.4. Options#

-c CONFIG | –config=CONFIG

Use the configuration file CONFIG; see kych-eid.conf(5). Only DATABASE and SQL_DIR of the [kych-eid] section are read.

-L LEVEL | –log=LEVEL

Set the logging verbosity. Defaults to INFO.

-v | –verbose

Also log what the libraries have to say.

–sql-dir=DIR

Read versioning.sql and the kych-eid-*.sql patches from DIR instead of SQL_DIR (/usr/share/kych-eid/sql for the package).

-n | –dry-run

Report which patches would be applied and change nothing.

–print-connection

Print the connection the configuration names as PGDATABASE, PGHOST and PGPORT assignments for a shell, and exit without connecting.

-h | –help

Print short help.

–version

Print version information.

26.35.5. Exit Status#

0

The database is at the latest patch level.

2

There is no database to work on: it does not exist, or no server listens where the configuration says. The postinst treats this as the state of a first install.

1

Anything else; a failing patch is rolled back.

26.35.6. See Also#

kych-eid(1), kych-eid-dbconfig(1), kych-eid.conf(5).

26.35.7. Bugs#

Report bugs by using https://bugs.taler.net/ or by sending electronic mail to <taler@gnu.org>.