On Thu, Jun 20, 2019, at 1:45 PM, Michael Merickel wrote: > 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...
I think that's what the stackoverflow answer says too. At the moment that might be the most expedient approach. However I can see that Alembic might benefit from having a special option to autogenerate a model into Python code assuming no database to start with. Feel free to propose though Alembic is suffering from lack of contributors right now. >> >> 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 >> <mailto:sqlalchemy-alembic%2bunsubscr...@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 > > <https://groups.google.com/d/msgid/sqlalchemy-alembic/CAKdhhwFSmC4yBgCuYSNDS%2BLXUSBUYbbE8tCnjQdYyp_NWfHo8Q%40mail.gmail.com?utm_medium=email&utm_source=footer>. > 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. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy-alembic/374bd5a9-6320-4677-8ed8-842d21eb3738%40www.fastmail.com. For more options, visit https://groups.google.com/d/optout.