alembic history -r current:head is perfect.
Thanks!

On Tue, Dec 2, 2014 at 4:28 PM, Michael Bayer <[email protected]>
wrote:

>
>
> > On Dec 2, 2014, at 4:06 PM, Daniel Son <[email protected]> wrote:
> >
> > Hi,
> >
> > Is there a way to have a dry run for alembic revision?
> > Or a very easy way to detect an error case via the command. For example,
> I have 2 revisions that have just branched and now I need to create a merge
> point as the next revision.
> >
> > I'm trying to create a build hook that catches this case and fails and
> alerts the developer to create a merge/fix parents before committing this
> set of revisions.
>
>
> if you’re just trying to catch issues at the level of the structure of
> revision files, the “history” command uses the same iteration that the
> “upgrade” command does.   Just say “alembic history current:head” and it
> will either work or it won’t.
>
> For a “dry” run where you can run SQL, usually —sql mode is the best
> approach.   Alternatively if you have transactional DDL you can add a
> rollback() to your env.py to prohibit the transaction from being committed.
>
> --
> 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 [email protected].
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to