[Python] Flask Migrate, upgrade failed but now unable to undo to downgrade

Discussão em 'Python' iniciado por Stack, Junho 19, 2025.

  1. Stack

    Stack Membro Participativo

    I'm working through a flask app built roughly following the Flask Mega Tutorial from Miguel Grinberg. I did not realize I made a change incorrectly when adding a foreign key until I ran the flask db upgrade command. flask db migrate ran just fine.

    The error at the end of the stack dump was: ValueError: Constraint must have a name

    So clearly my rookie self needs to find the right way to do this, so I undid the changes to my db models and thought I should then downgrade my flask migration and try again after researching my mistake. Unfortunately I am unable to run flask db downgrade as I get the same error.

    Continue reading...

Compartilhe esta Página