The recipe doesn't get into this to reduce complexity but the various
CREATE / DROP phrases would be encoded into DDL() objects as in
http://docs.sqlalchemy.org/en/latest/core/ddl.html , or for more structure
objects like CreateSP, DropSP etc as DDLElement subclasses associated with
compiler hooks as in
http://docs.sqlalchemy.org/en/latest/core/compiler.html#dialect-specific-compilation-rules
,
  These objects are then linked into the create_all() sequence using the
above described "after_create" event hooks.

A new section could be added to the recipe illustrating this as an
additional step to take after all the other concepts are explained.  though
I'm writing this on my phone at the moment.

On Saturday, August 27, 2016, 'euphred' via sqlalchemy-alembic <
sqlalchemy-alembic@googlegroups.com> wrote:

> The cookbook shows a good example
> <http://alembic.zzzcomputing.com/en/latest/cookbook.html#building-an-up-to-date-database-from-scratch>
> of generating the entire current schema from scratch using sqlalchemy,
> which I want to do for int tests.
> It also shows a construct for reliably migrating complete objects
> <http://alembic.zzzcomputing.com/en/latest/cookbook.html#replaceable-objects>
> (eg stored procs) using something phrased, Replaceable Objects, which would
> be great for our migrations.
> But they can't be used together because SQLAlchemy's create_all() won't
> include the procs etc.
>
> Is there a suggested approach to marry these? Alternative seems to be
> migrate all the things (ie run all migrations steps)
>
> Cheers
>
> --
> 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:_e(%7B%7D,'cvml','sqlalchemy-alembic%2bunsubscr...@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.

Reply via email to