Skip to content

extensible revision / autogenerate strategies #301

Closed
@sqlalchemy-bot

Description

@sqlalchemy-bot

Migrated issue, originally created by Michael Bayer (@zzzeek)

allow plugins at environment time which will change what the "alembic revision" command does; allow it to generate any number of revision files which each contain any subset of directives. The autogenerate system will deliver a stream to the plugin which the plugin can rewrite; the default form of this stream is "Script(--> upgrades --> downgrades)" , where "upgrades" / "downgrades" are a series of objects representing things we will render in the template; these objects in turn refer to the "diffs" that generated them. In this way the "stream" can be rewritten to be in the form of multiple Script objects which contain subsets of things within "upgrades" / "downgrades"; directives can be split out into multiple branches, the "downgrades" can be totally omitted, and the directives within "upgrades" / "downgrades" themselves can be rewritten or augmented.

Additionally, and this may be a separate issue, the rendering of the op directives themselves should be extensible. ideally some system which defines all of the op directive as present in operations, its documentation, as well as how it renders should be encapsulated in some kind of object.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions