On Wed, Nov 14, 2018 at 6:07 AM <samuel.grigol...@gmail.com> wrote:
>
> Hi all!
>
> Is there support in Alembic for anything like the "redo" feature present in 
> Ruby on Rails' Active Record Migrations tool? I often find myself running an 
> "upgrade", followed by a "downgrade" and then finally another upgrade, in 
> order to be sure the migration's rollback function is properly implemented. 
> With the said tool there is a command-line switch that does a similar thing 
> (i.e. downgrading a certain number of migrations and applying them again):
>
> $ rails db:migrate:redo STEP=3
> Source: https://edgeguides.rubyonrails.org/active_record_migrations.html
>
> I know that this would be a very minor helper, considering a simple bash 
> script can do the trick. Nevertheless one may find it useful to find this in 
> the docs and maybe even adapt their current development workflow? I'd like to 
> know what your thoughts are on this.

Usually, this falls under the realm of "testing" and what people want
are automated fixtures that run through all the upgrades individually,
and the downgrades also if supported.   We have one of these in
Openstack which provides that the developer create a test case for
every upgrade.   A set of test fixtures for Alembic would be a nice to
have but is not something I have the resources to develop right now.

As for a manual flag that doesn't seem like that common of a use case
to me.   A lot of folks don't even implement downgrades since they are
not that practical for production systems, and in any case, this is
not really a complete test that the migration worked, only that it
didn't raise any errors.






>
> Regards,
> Samuel.
>
> --
> 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.

-- 
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