#23226: Migrations generated by python2 break when using python3 to migrate
---------------------------------+----------------------------------------
Reporter: morshed.nader@… | Owner: andrewgodwin
Type: Bug | Status: closed
Component: Migrations | Version: 1.7-rc-2
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------
Comment (by thornomad):
Related to this - I have an older project with a migration that was
created and uses the `b'string value'` approach; now, when running `python
manage.py makemigrations` a new migration is generated that only removes
the `b` and just leaves it as `string value`.
Initial:
{{{
('object_pk', models.PositiveIntegerField(verbose_name=b'object ID'))
}}}
New migration:
{{{
migrations.AlterField(
model_name='mymodel',
name='object_pk',
field=models.PositiveIntegerField(verbose_name='object ID'),
),
}}}
My question is: is it necessary to create this migration just to change
from bytes to str ? Or can I safely just edit my _initial_ migration and
remove the `b` ?
Thanks
--
Ticket URL: <https://code.djangoproject.com/ticket/23226#comment:18>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/081.5ae723bf3856e851a50f0539510e0ade%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.