Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
extensible revision / autogenerate strategies #301
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.
Michael Bayer (@zzzeek) wrote: