]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
Refactor `CommandLine` command registration
authorMikhail Bulash <scaryspiderpig@proton.me>
Tue, 29 Apr 2025 19:49:35 +0000 (15:49 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 7 May 2025 15:01:52 +0000 (11:01 -0400)
commitc746e1b6eb0814e16c737244727f3b30d99f1a15
tree1af974381d66d40970e382e70911cc561f2f4a04
parent41198bb1a84960e908d10c61f1a96bf594a33c23
Refactor `CommandLine` command registration

Added new :meth:`.CommandLine.register_command` method to
:class:`.CommandLine`, intended to facilitate adding custom commands to
Alembic's command line tool with minimal code required; previously this
logic was embedded internally and was not publicly accessible.  A new
recipe demonstrating this use is added.   Pull request courtesy Mikhail
Bulash.

Fixes: #1610
Closes: #1611
Pull-request: https://github.com/sqlalchemy/alembic/pull/1611
Pull-request-sha: d2ffce008317508449de9bd0bce3ff9076c5d90f

Change-Id: Icab9978357915e81bb52a9f0717f21d5ee7f8341
alembic/config.py
docs/build/cookbook.rst
docs/build/unreleased/1610.rst [new file with mode: 0644]
tests/test_config.py