On this page
Registers db init, db verify, and db migrate (plan/apply/status), wrapping the pgdesign-generated schema executor and the pgdesign migrate CLI.
#cli.src.orxtra.cli._db
#cli.src.orxtra.cli._db
CLI db command group for database provisioning and migration.
Registers db init, db verify, and db migrate (plan/apply/status) commands on the orxtra CLI. Uses the pgdesign-generated schema executor for init/verify, and wraps pgdesign migrate subcommands for migrations.
Layering note: the generated executor ships inside the orxtra namespace at orxtra.services._generated so it resolves in both the editable dev tree and an installed wheel. The shared asyncpg adapter lives in orxtra.services._schema.
#_schema_dir
def _schema_dir() -> strReturn the path to the schema/ directory.
#_find_pgdesign
def _find_pgdesign() -> strLocate the pgdesign binary on PATH.
#_run_pgdesign
def _run_pgdesign(subcommand: str, db_url: str, extra_args: list[str] | None=None) -> NoneRun a pgdesign migrate subcommand and exit with its code.
#_register_migrate_commands
def _register_migrate_commands(db_group: strictcli.Group) -> NoneRegister the db migrate subgroup.
#register_db_commands
def register_db_commands(app: strictcli.App) -> NoneRegister the db command group on the orxtra CLI.