mirror of
https://github.com/Icinga/icingadb.git
synced 2026-02-18 18:18:00 -05:00
To get rid of docker-icingadb and its additional entry point, the schema import functionality has been implemented directly in Icinga DB. Using the new --database-auto-import command line argument will result in an automatic schema import if no schema is found. The implementation is split between the already existing CheckSchema function and the introduced ImportSchema function. The CheckSchema function is now able to distinguish between the absence of a schema and an incorrect schema version. Both situations return a separate error type. As before, CheckSchema is called in the main function. If the error type now implies the absence of a schema (ErrSchemaNotExists) and the --database-auto-import flag is set, the auto-import is started. The schema import itself is performed in the new ImportSchema function, which loads the schema from a given file and inserts it within a transaction, allowing to rollback in case of an error. Fixes #896. |
||
|---|---|---|
| .. | ||
| command | ||
| config | ||
| version.go | ||