server.cli.db

Database management commands for Jobmon Server.

Functions

db(→ None)

Database management commands.

init(→ None)

Initialize a new Jobmon database.

upgrade(→ None)

Apply database migrations.

terminate(→ None)

Terminate/drop a Jobmon database.

Module Contents

server.cli.db.db() None

Database management commands.

b Commands for initializing, upgrading, and terminating the Jobmon database.

b .. rubric:: Examples

jobmon-server db init jobmon-server db upgrade –revision head jobmon-server db terminate –yes

server.cli.db.init(db_uri: str) None

Initialize a new Jobmon database.

Creates the database schema and applies all migrations.

b .. rubric:: Examples

# Use config file settings jobmon-server db init

# Override with specific URI jobmon-server db init –db-uri “mysql://user:pass@host/jobmon”

server.cli.db.upgrade(db_uri: str, revision: str) None

Apply database migrations.

Upgrades the database schema to the specified revision.

b .. rubric:: Examples

# Upgrade to latest jobmon-server db upgrade

# Upgrade to specific revision jobmon-server db upgrade –revision abc123

server.cli.db.terminate(db_uri: str, yes: bool) None

Terminate/drop a Jobmon database.

WARNING: This is a destructive operation that will delete all data!

b .. rubric:: Examples

# With confirmation prompt jobmon-server db terminate

# Skip confirmation (for scripts) jobmon-server db terminate –yes