dingo docs Help

configs

dingo uses Trico as a configuration management tool and currently supports yml, yaml and json files and environment variables.

Use this section as a reference dingo configurations.

configuration key

required

default

db.connection-string

null

db.provider

PostgreSQL

migration.delimiter

^--\s*down$

migration.wildcard

*.sql

migration.force-paths

null

migration.path

~

null

migration.down-required

false

log.level

Information

db.connection-string

Database connection string in the following format: Server=SERVER_HOST;Database=DB__NAME;User Id=USERNAME;Password=PWD;

db: connection-string: Server=127.0.0.1;Database=dingo;User Id=dingo_usr;Password=VeryStr0ngPwd#;
{ "db": { "connection-string": "Server=127.0.0.1;Database=dingo;User Id=dingo_usr;Password=VeryStr0ngPwd#;" } }
export DINGO_DB__CONNECTION_STRING="Server=127.0.0.1;Database=dingo;User Id=dingo_usr;Password=VeryStr0ngPwd#;"

db.provider

Database provider of the target DB where migrations will be applied

db: provider: PostgreSQL
{ "db": { "provider": "PostgreSQL" } }
export DINGO_DB__PROVIDER=PostgreSQL

migration.delimiter

Regular expression to specify migration file line that separates up and down parts of a migration.

migration: delimiter: '^--\s*down$'
{ "migration": { "delimiter": "^--\s*down$" } }
export DINGO_MIGRATION__DELIMITER="^--\s*down$"

migration.wildcard

Wildcard used to search migration files in the specified directory

migration: wildcard: *.sql
{ "migration": { "wildcard": "*.sql" } }
export DINGO_MIGRATION__WILDCARD="*.sql"

migration.force-paths

List of paths containing migrations that need to be forcefully applied on every patch. The most common use-case is to reapply all stored procedures / functions after user defined types have been changed.

migration: force-paths: - ./db/auth/procedures - ./db/auth/types
{ "migration": { "force-paths": [ "./db/auth/procedures", "./db/auth/types" ] } }
export DINGO_MIGRATION__FORCE_PATHS="./db/auth/procedures ./db/auth/types"

migration.path

Path where migration files are stored. Can be provided either in the configuration file or as a -p parameter

migration: path: ./db/auth
{ "migration": { "path": "./db/auth" } }
export DINGO_MIGRATION__PATH="./db/auth"

migration.down-required

Specifies if down part of migrations is required. If true - applying migrations will fail if any of migration files in the specified directory lack the down part.

migration: down-required: false
{ "migration": { "down-required": false } }
export DINGO_MIGRATION__DOWN_REQUIRED=false

log.level

Specifies logging level of the application

log: level: Information
{ "log": { "level": "Information" } }
export DINGO_LOG__LEVEL=Information

Example config

db: connection-string: Server=127.0.0.1;Database=dingo;User Id=dingo_usr;Password=VeryStr0ngPwd#; provider: SqlServer schema: dingo migration: delimiter: '^--\s*down$' wildcard: *.sql down-required: true log: level: Error
{ "db": { "connection-string": "Server=127.0.0.1;Database=dingo;User Id=dingo_usr;Password=VeryStr0ngPwd#;", "provider": "SqlServer", "schema": "dingo" }, "migration": { "delimiter": "^--\s*down$" "wildcard": "*.sql" "down-required": true }, "log": { "level": "Error" } }
export DINGO_DB__CONNECTION_STRING="Server=127.0.0.1;Database=dingo;User Id=dingo_usr;Password=VeryStr0ngPwd#;" export DINGO_DB__PROVIDER=SqlServer export DINGO_DB__SCHEMA=dingo export DINGO_MIGRATION__DELIMITER="^--\s*down$" export DINGO_MIGRATION__WILDCARD="*.sql" export DINGO_MIGRATION__DOWN_REQUIRED=true export DINGO_LOG__LEVEL=Error
Last modified: 22 October 2024