'-' chars in revision name do not allow upgrading #441
Comments
Michael Bayer (@zzzeek) wrote: |
Michael Bayer (@zzzeek) wrote: Raise if manual revision id contains dashes or at signs A :class: Change-Id: I60a794a5c80bf47b149998b8c5cb04ecbfd05bfa → 2645faf |
Changes by Michael Bayer (@zzzeek):
|
Orestes Sanchez wrote: Thank you!!! So fast! I think it is not only "@" and "-", but also "+". In fact, all the special chars that are used as delimiters in the regular expression. What do you think?
|
Michael Bayer (@zzzeek) wrote: yeah. arg. i released and forgot to get to that. |
Michael Bayer (@zzzeek) wrote: add @ to the list and try again |
Changes by Michael Bayer (@zzzeek):
|
Michael Bayer (@zzzeek) wrote: der add + that is. When i looked at the reg i didn't see the "" there. |
Idris Yusupov wrote: I have the following format So I have to downgrade to 0.9.4 |
Michael Bayer (@zzzeek) wrote: why cant you change the name of your migration? the filename can stay as is, you just need to change the name inside the file itself |
Michael Bayer (@zzzeek) wrote: also...how did that name even work when I can reproduce this bug with any name that has a dash in it |
Orestes Sanchez wrote: I also had migration names with a dash before realizing about this problem, but I didn't use the name to upgrade or downgrade, I run a full
So if you run an upgrade without any name, then alembic does not complain, but when I tried to use one of those dashed revision names, it broke.
|
Michael Bayer (@zzzeek) wrote: |
Changes by Michael Bayer (@zzzeek):
|
Migrated issue, originally created by Orestes Sanchez
I am afraid that using some chars as '-' and '@' on the names of a revision produces weird results.
I am using flask-migrate, but I think the problem is only alembic related.
I have created a bunch of migrations called "models-XXX_*", where XXX is a number. Here it is a listing of the migration files:
Say I am on version
models-004_remove_is_active.py
and I would like to migrate tomodels-005_resize_fields.py
.When performing an upgrade I get the following error:
It looks like that it breaks the name of a revision into pieces using the following RE:
I tried to find the location in the documentation that describes any constraint on the name of revisions, but I didn't find it. I suggest updating the doc to describe this constraint.
The text was updated successfully, but these errors were encountered: