On 11/12/2015 11:46 AM, Alyssa Kwan wrote: > Thanks, Michael! > > In terms of the ReplaceableObject, I was hoping for a composite > operation that could use existing Alembic operations, without needing to > generate the underlying SQL.
For instance, the single composite > operation would use Alembic's built-in create_table() in sequence with > other operations, built-in or custom. Neither example addresses this. ReplaceableObject is just an example. You'll note it uses operations.execute() in its implementation. That's the Operation object; in your own implementation methods, you can call operations.alter_column(), operations.create_table(), whatever you want on it. > > It seems like in the Operations.implementation_for(), I get an > operations object, which I could use to call operations.create_table(), > followed by any other operations; to achieve the desired result? Am I on > the right track? yup > > Thanks! > Alyssa > > On Thursday, November 12, 2015 at 6:43:37 AM UTC-8, Michael Bayer wrote: > > I'd take a look at > > > http://alembic.readthedocs.org/en/latest/api/operations.html#operation-plugins > > <http://alembic.readthedocs.org/en/latest/api/operations.html#operation-plugins> > > and for a longer example > http://alembic.readthedocs.org/en/latest/cookbook.html#replaceable-objects > > <http://alembic.readthedocs.org/en/latest/cookbook.html#replaceable-objects>. > > > > > > > On 11/11/2015 04:26 PM, Alyssa Kwan wrote: > > Hi all, > > > > I have a single logical Alembic operation that is best implemented > as a > > series of lower level operations (like create_sequence, > create_table(s), > > add_constraint(s), etc.). What's the best way to implement this? I > > assume it would be to somehow extend OpContainer? I don't see any > > examples, nor do I see how OpContainer is used. > > > > Thanks! > > Alyssa > > > > -- > > You received this message because you are subscribed to the Google > > Groups "sqlalchemy-alembic" group. > > To unsubscribe from this group and stop receiving emails from it, > send > > an email to sqlalchemy-alembic+unsubscr...@googlegroups.com > <javascript:> > > <mailto:sqlalchemy-alembic+unsubscr...@googlegroups.com > <javascript:>>. > > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. > > -- > You received this message because you are subscribed to the Google > Groups "sqlalchemy-alembic" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to sqlalchemy-alembic+unsubscr...@googlegroups.com > <mailto:sqlalchemy-alembic+unsubscr...@googlegroups.com>. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sqlalchemy-alembic" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy-alembic+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.