quackamollie.core.database.query.startup_query module

async quackamollie.core.database.query.startup_query.ensure_app_roles_registered_in_db(async_session: async_sessionmaker[AsyncSession])[source]

Ensure that the application roles are registered in the Database, i.e. an AppRole row exists for every value of AppRoleType

Parameters:

async_session (async_sessionmaker[AsyncSession]) – The async session maker associated to the initialized database engine

async quackamollie.core.database.query.startup_query.ensure_bot_user_registered_in_db(async_session: async_sessionmaker[AsyncSession])[source]

Ensure that the current bot is registered in the Database as a SYSTEM user

Parameters:

async_session (async_sessionmaker[AsyncSession]) – The async session maker associated to the initialized database engine

async quackamollie.core.database.query.startup_query.ensure_model_manager_types_registered_in_db(async_session: async_sessionmaker[AsyncSession])[source]

Ensure that the loaded model manager types are registered in the Database in the dedicated table in types schema

Parameters:

async_session (async_sessionmaker[AsyncSession]) – The async session maker associated to the initialized database engine