I think the basic idea is to create a database and codebase in the state of the target revision. Then autogenerate a migration from nothing to that revision - just like you would do when starting to use alembic from an existing schema. From there you can change the slug on it so that it works as the down_revision of later migrations and clear out the old unused migrations that you're replacing.
- Michael On Thu, Jun 20, 2019 at 2:37 AM Chris Withers <ch...@withers.org> wrote: > Hi All, > > I have some versions that make use of the third party package I no > longer use, how do I collapse down alembic revisions that have already > been executed everywhere? > > I found > > https://stackoverflow.com/questions/34491914/alembic-how-to-merge-all-revision-files-to-one-file > but that doesn't feel right... > > Chris > > -- > 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. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sqlalchemy-alembic/933cd6aa-0e35-8716-3725-56947157103b%40withers.org > . > For more options, visit https://groups.google.com/d/optout. > -- Michael -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy-alembic/CAKdhhwFSmC4yBgCuYSNDS%2BLXUSBUYbbE8tCnjQdYyp_NWfHo8Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.