stalker.db

Database module of Stalker.

Whenever stalker.db or something under it imported, the stalker.db.setup() becomes available to let one setup the database.

Functions

check_alembic_version() checks the alembic version of the database and raise a ValueError if it is not matching with this version of Stalker
create_alembic_table() creates the default alembic_version table and creates the data so that any new database will be considered as the latest version
create_entity_statuses([entity_type, …]) creates the default task statuses
create_repo_vars() creates environment variables for all of the repositories in the current database
create_ticket_statuses() creates the default ticket statuses
get_alembic_version() returns the alembic version of the database
init() fills the database with default values
register(class_) Registers the given class to the database.
setup([settings]) Utility function that helps to connect the system to the given database.
update_defaults_with_studio() updates the default values from Studio instance if a database and a Studio instance is present