Expand description
Opens the CLI’s database, seeds the built-in and user-catalog DCS/PLC templates, and runs
the history-retention sweep – all on every startup.
Functions§
- open
- Opens (creating if necessary) the database at
path, running migrations, then upserts the built-in templates viabhtune_db::seed_builtin_templatesso a fresh database is immediately usable without a separate setup step. Ifuser_templatesisSome(the caller found and parsed a user catalog file – seecrate::config::load_user_templates,template-user-catalog), those templates are additionally upserted withTemplateOrigin::Catalogviabhtune_db::seed_templates.Nonemeans no user catalog file was found at all, which is not an error and simply skips this second seed pass – the common case, since most installs never createtemplates.toml.