Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extensible revision / autogenerate strategies #301

Closed
sqlalchemy-bot opened this issue Jun 11, 2015 · 3 comments
Closed

extensible revision / autogenerate strategies #301

sqlalchemy-bot opened this issue Jun 11, 2015 · 3 comments

Comments

@sqlalchemy-bot
Copy link

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.

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

see #302

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

  • squash merge of ticket_302 branch
  • The internal system for Alembic operations has been reworked to now
    build upon an extensible system of operation objects. New operations
    can be added to the op. namespace, including that they are
    available in custom autogenerate schemes. fixes operations as objects #302
  • The internal system for autogenerate been reworked to build upon
    the extensible system of operation objects present in operations as objects #302.
    A new customization hook process_revision_directives is added
    to allow manipulation of the autogen stream. Fixes extensible revision / autogenerate strategies #301

0e43247

@sqlalchemy-bot
Copy link
Author

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant