Configuring the Database Connection
Notice: All of the following config options can be set in
/etc/sicura/sicura-console.yaml
There is no default database so you must define a PostgreSQL connection string in sicura-console.yaml
using one of the following formats:
main.database: postgres://ip_address:port/database
main.database.options:
user: user
password: passwordmain.database: "postgres://"
main.database.options:
user: user
password: password
host: ip_address
port: port
database: database
You can specify additional general and PostgreSQL specific options using main.database.options
.
Migrating from SQLite to PostgreSQL
To migrate a SQLite database to PostgreSQL, use the sicura-console migrate
command.
Changing the Database Table Prefix
By default, the Sicura Console configures a table prefix for all database tables it manages. This allows admins the capability to run multiple Sicura Console instances using the same underlying database. For example, one could have tables with the names production
, staging
, and dev
all within the same database.
The default prefix is production, but it can be changed. For example, this creates all database tables with dev_ in front of them.
main.database_table_prefix: dev