Closed jessamynsmith closed 9 years ago
The same error.
Same
Same here. Besides, every time I execute
manage.py makemigrations && PYTHONPATH=~/dev/aimara/ ./manage.py migrate
A new migration is created:
Migrations for 'socialaccount': 0009_auto_20150223_1658.py:
- Alter field provider on socialaccount
- Alter field provider on socialapp Operations to perform: Synchronize unmigrated apps: pipeline, allauth, github, google Apply all migrations: socialaccount, sessions, account, sites, admin, contenttypes, auth... Synchronizing apps without migrations: Creating tables... Installing custom SQL... Installing indexes... Running migrations: Applying socialaccount.0009_auto_20150223_1658... OK
Examples of successive generated migrations here.
The change between migrations is just the order of the arguments given to models.CharField(...)
, in migrations.AlterField(... field=models.CharField(...))
I looked into this a little more. The change on extra_data seems to be just the b'' vs '' on the default, from:
('extra_data', allauth.socialaccount.fields.JSONField(default=b'{}', verbose_name='extra data')),
to
('extra_data', allauth.socialaccount.fields.JSONField(default='{}', verbose_name='extra data')),
migrations.AlterField(
model_name='socialaccount',
name='extra_data',
field=allauth.socialaccount.fields.JSONField(default='{}', verbose_name='extra data'),
preserve_default=True,
),
For socialaccount and socialapp, it is a change in choices for provider
, presumably related to the dynamically generated choices. In models.py:
provider = models.CharField(verbose_name=_('provider'),
max_length=30,
choices=providers.registry.as_choices())
Because I only have facebook enabled, the generated migration has:
migrations.AlterField(
model_name='socialaccount',
name='provider',
field=models.CharField(verbose_name='provider', max_length=30, choices=[('facebook', 'Facebook')]),
preserve_default=True,
),
migrations.AlterField(
model_name='socialapp',
name='provider',
field=models.CharField(verbose_name='provider', max_length=30, choices=[('facebook', 'Facebook')]),
preserve_default=True,
),
I opened a PR that fixes some of these migration issues.
In a clean Django 1.7 project, if I add
allauth.socialaccount
to INSTALLED_APPS, I get an error onpython manage.py migrate
:If I run
python manage.py makemigrations
it generates a migration for socialaccount: